emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Andreas Leha <andreas.leha@med.uni-goettingen.de>
Cc: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org
Subject: Re: Extending ODT export
Date: Wed, 22 May 2013 14:06:34 +0530	[thread overview]
Message-ID: <87wqqrfm25.fsf@gmail.com> (raw)
In-Reply-To: <878v3q7xpi.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Wed, 08 May 2013 09:11:21 +0200")


doc-view (for OpenDocument files) uses the below mentioned work around.

The fix can be ported to `org-odt.el' and `ox-odt.el'.


--8<---------------cut here---------------start------------->8---
(defun doc-view-odf->pdf-converter-soffice (odf callback)
  "Convert ODF to PDF asynchronously and call CALLBACK when finished.
The converted PDF is put into the current cache directory, and it
is named like ODF with the extension turned to pdf."
  ;; FIXME: soffice doesn't work when there's another running
  ;; LibreOffice instance, in which case it returns success without
  ;; actually doing anything.  See LibreOffice bug
  ;; https://bugs.freedesktop.org/show_bug.cgi?id=37531.  A workaround
  ;; is to start soffice with a separate UserInstallation directory.
  (let ((tmp-user-install-dir (make-temp-file "libreoffice-docview" t)))
    (doc-view-start-process "odf->pdf" doc-view-odf->pdf-converter-program
			    (list
			     (concat "-env:UserInstallation=file://"
				     tmp-user-install-dir)
			     "--headless" "--convert-to" "pdf"
			     "--outdir" (doc-view-current-cache-dir) odf)
			    (lambda ()
			      (delete-directory tmp-user-install-dir t)
			      (funcall callback)))))
--8<---------------cut here---------------end--------------->8---



Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:

> I had problems to use LibreOffice to convert a *already open* document.  So,
> if you are viewing the doc in LibreOffice while you try your export, you
> might run into problems.
>
> This is a reported bug in LibreOffice.  The suggested work-around is to
> use a temporary profile as in:
> libreoffice "-env:UserInstallation=file:///tmp/LibO_Conversion"
> --headless --invisible --convert-to txt:text "$FILENAME" >/dev/null
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> You might try to add that to the conversion command and see whether it
> helps.

  reply	other threads:[~2013-05-22  8:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 11:37 Extending ODT export Julian M. Burgos
2013-05-07 11:41 ` Julian M. Burgos
2013-05-07 12:29   ` Christian Moe
2013-05-07 13:32     ` Carsten Dominik
2013-05-07 13:51       ` Julian M. Burgos
2013-05-07 15:06         ` Takaaki ISHIKAWA
2013-05-07 15:41           ` Julian M. Burgos
2013-05-07 16:28             ` Nick Dokos
2013-05-07 16:24           ` Takaaki ISHIKAWA
2013-05-08  7:11             ` Andreas Leha
2013-05-22  8:36               ` Jambunathan K [this message]
2002-01-01  0:34                 ` bug#14440: " Jambunathan K
2013-05-10 10:04             ` Julian M. Burgos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqqrfm25.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).