Bug 66852 - FILESAVE: Converting html to doc or pdf using soffice command line doesn't convert embedded image
Summary: FILESAVE: Converting html to doc or pdf using soffice command line doesn't co...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: Other All
: high normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-12 12:07 UTC by Ranieri Mazili
Modified: 2015-10-27 10:38 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ranieri Mazili 2013-07-12 12:07:19 UTC
Hi, 

you can see more details, examples of how to reproduce and print screen here: http://ask.libreoffice.org/en/question/20111/converting-files-using-soffice-convert-to-with-embedded-images-html-to-doc/

Resuming, if you have an embedded image (base64 using the img tag) in the html and then try to convert this file to a doc or pdf using the command line: soffice -headless -convert-to doc test.html

the doc file generated doesn't have the embedded image and left just a blank space where the image should be.
Operating System: Windows 7
Version: 4.0.4.2 release
Comment 1 Owen Genat (retired) 2013-07-13 02:55:45 UTC
Set status to NEW, version to v4.0.3.3, and platform to All as I can confirm this under GNU/Linux Crunchbang 11 x86-64 running TDF/LO v4.0.3.3. For the sake of simplicity an example file can be found here:

http://www.akamine.com.br/blog/imagem_embutida.html
Comment 2 Benoit Lathiere 2013-11-06 16:16:39 UTC
I've got the same problem (no picture, just spaces in the document) when I convert from html to docx with images linked (e.g. <img src="http://ww.xx.yy/aze.png"/>).

Context : Gnu/Linux Debian 7.2 / LibreOffice 3.5.
I tested all theses filters, without success :
:writer_OOXML =invalid document*,
:"Office Open XML Text" =no image,
:"MS Word 2007 XML" =no image,
:"MS Word 97" = invalid document*.

*the file contains HTML text !

No problem to convert to .doc, .pdf or .odt.
Comment 3 Oleg 2014-03-14 12:59:15 UTC
Hello to everyone!
Converting html with embedded images still doesn't work.
LibreOffice 4.2.2 (release at the moment)
OS: Windows 7, GNU/Linux i686 i386

Converting doesn't work for both linked images (like  <img src="http://ww.xx.yy/aze.png"/>) and for base64 encoded images.
Everytime I get ton of symbols and broken images.
Are there any updates?
Comment 4 Clement 2014-03-17 15:56:30 UTC
Hi,

This really sounds like an important issue as it produces completely junk output and breaks potentially very important features from using LibreOffice. 

Any update? Any idea of a direction where to dig? 

Thanks in advance
Comment 5 Joel Madero 2015-05-02 15:43:22 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

   Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.2 or later)
   https://www.libreoffice.org/download/

   If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
 
 If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

   Update the version field
   Reply via email (please reply directly on the bug tracker)
   Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-05-02
Comment 6 Christophe Deliens 2015-10-27 10:38:58 UTC
Embedded image successfully tested OK on LibreOffice 4.4.5.2 (Mac OSX 10.10.5), using command:

/Applications/LibreOffice.app/Contents/MacOS/soffice --invisible --headless --convert-to docx:"Office Open XML Text" --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