[Libreoffice-bugs] [Bug 134681] ibreoffice headless convert-to generate empty html from pdf

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Jul 9 09:25:56 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=134681

Maxim Monastirsky <momonasmon at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |momonasmon at gmail.com

--- Comment #1 from Maxim Monastirsky <momonasmon at gmail.com> ---
(In reply to b_b from comment #0)
> With the test file attached to the first issue, this commend generate en
> empty output :
> 
> soffice --headless --convert-to html:"XHTML Writer File:UTF8" install.pdf
This command is wrong, and I'm actually surprised it doesn't throw an error.
PDF files are associated by default with Draw, but "XHTML Writer File" is an
export filter of Writer. Obviously you can't use a Writer filter when exporting
a file loaded using Draw...

The solution here is to explicitly set the Writer pdf import filter with
--infilter="writer_pdf_import".

Other generic formats (like html, rtf or plain text) can just add "--writer" to
the command line, without specifying the input filter name, but this doesn't
work for PDF. This can also be reproduced from the UI: Trying to open a pdf
file from inside Writer, will still open it Draw.

> This command wirks well, but lacks utf8 support :
> 
> soffice --headless --convert-to html install.pdf
Try --convert-to html:"XHTML Draw File".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200709/44e1fa79/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list