LO Writer: images do not export to pdf

I have LibreOffice 6.0.7.3 installed to Ubuntu 18.04.

After image has been inserted into Writer document it appears on screen within the document. Image can be repositioned, resized, etc. But when document is printed, no, I mean exported to PDF image is not included.

Would appreciate a solution for this issue.

My system dual boots Ubuntu and W10 with MS Office 2007. Same document created in LO Writer when printed to PDF from MS Word successfully included image. I would prefer to avoid having to resort to this workaround, I intend to migrate to Ubuntu full-time.

Hello,

if you are using Print functionality to create your PDF (and not File -> Export As -> Export as PDF) the please assure option Tools -> Options -> LibreOffice Writer -> Print -> Category: Contents -> Option: Images and Objects is ticked (1). You may also check the setting in advance of printing within the print dialog tab: LibreOffice Writer (2)

Option Setting (1)

Print Dialog (2)

What I tried to do was make the pdf file by hitting the ‘Export as PDF’ button in the toolbar. Image was included in *.odt document but did not appear in exported PDF file.
I checked the settings described in your screenshots. That is how they are in my installation of LO Writer. Does not result in image appearing in pdf file.
I tried going Ctrl+P and using the ‘Print to File…’ feature. At the final stage where the directory to save file is selected and file name written in, there was no option to select pdf. I typed in filename.pdf. Resultant file saved was named filename.pdf.ps - a post script file. Not a pdf file like I wanted, but it did include the image from the original *.odt file.
So still cannot print or export to pdf and include image in pdf file.

Sigh - you wrote in your question

But when document is printed

and now you tell me that you are using Export as PDF

Apologies for that. I was familiar with the term ‘print to pdf’ from my recently superseded and very long in the tooth XP system. Assumed I could use them interchangeably with LO Writer. They were nicely edited screenshots too. I appreciate the effort you made. Sorry for leading you astray. Anyhow, my problem is still there to be solved.

OK - just checked on my Ubuntu 18.04. test system and using LibreOffice 6.0.7.3 and could not find any problem. You may try to use:

libreoffice --convert-to pdf <filename>

to convert on command line and to see whether there is an error / informational message.

Ran that command from terminal. Made for very rapid file conversion from *.odt to *.pdf. Unfortunately resulting pdf file does not include image placed in original *.odt file. Terminal returned to relevant directory prompt without any error message or anything other message displayed.

Could you upload an anonymized version of your file?

The image in question was cropped from a scan of my hand written signature to add it to bottom of letter. Jumping back a step, which file would you like to examine - odt or pdf? I think it would be safest for me to simulate the processes used to make the existing files and I could upload either or both of those. It’s late here (Aus), will have to work on that tomorrow. After you tried repeating what I had done on your Ubuntu test system and it worked OK I wondered if I have introduced a software conflict to my system, or an LO dependency is out of whack or something. Is that likely? Thank you for your help thus far. Will be back in about 10h.

A couple possibilities …

Images missing proper metadata, specifically dimensions, may not appear in the PDF output.
There was a similar issue here awhile back (could not find it).
In the previous case I examined the GIF file and it had virtually no metadata at all.
Edited and/or converted it to where it did have proper dimensions and
proper metadata identifying it as a GIF, or a PNG, or a JPG, etc. …
and then it appeared in the PDF as expected.
So try editing/converting the image(s) in something like GIMP, or IrfanView, etc.
with the goal being to have properly structured image files which the PDF engine can read.

The other possibility is OpenGL is causing the problem.
But in that case usually the images do appear, but they are distorted.
You could try turning-off OpenGL.
Tools>Options>View>Graphics Output, uncheck “Use OpenGL for all rendering.”

.

Thank you for this response. It’s all in the details. The image I had tried to insert into the *.odt document had been saved from scanning software (gscan2pdf) as a *.pdf file - default for nearly all my scans. As mentioned, it could be inserted in *.odt file and could be manipulated and seen on screen, but was not visible when *.odt file was exported as *.pdf. Today I made a test document. Image inserted to it was saved from gscan2pdf as *.jpeg. When test *.odt file was exported as *.pdf image was visible. Success! This experience will keep me on my toes when doing similar jobs in future. Recently I had a minor problem with an image edited with Shutter (screenshot capture & edit). Cropped image for desktop launcher icon but image would not work until I went back and used Shutter’s ‘export as’ function. I think my first result with Shutter had induced the metadata problem you described, so operating system could not read file. Thanks also to Opaque. This is a great forum.

That would need an own bug report with a sample ODT with embedded scanned PDF - it’s not OK to miss scanned PDFs inserted into documents when exported to PDF…

I had a look at the bug report site but could not see any means of uploading a sample file on the report page. Can’t see how to upload file to this page either. I have prepared a sample file if you you can tell me how to upload it to either this site or LO bug report site.

OK, bug report submitted. Sample files attached: ODT with embedded scanned PDF; and resulting exported PDF file with embedded image not visible.

Thank you! (though I cannot reproduce using 6.3.2.1 on Windows both using OpenGL and disabling it, and also with 6.0.0.1 with OpenGL disabled; can only see distorted image in PDF exported from 6.0.0.1 with OpenGL. Linux-only problem perhaps.)

Had a look at the ODF archive attached to tdf#127757, it has no embedded PDF held in its Pictures directory, just two PNG from scans. Its content XML shows the images as a draw frame holding a mime type image/x-vclgraphic.

Over at the bug report it was suggested that .PNG image and not .PDF image was embedded. I did not save scanned image as .PNG. In case I had made an error when creating the first batch of sample files submittted, today I made new sample files from scratch and submitted them. Also submitted this time was the .PDF image inserted/embedded in .ODT file.
As before, embedded image is not visible in exported .PDF file.

tdf#127575

Tried doing same job from AppImage of LO 6.3.1.2. Same problem manifested: PDF image embedded in Writer ODT file was not visible when ODT file exported as PDF. Bug report has been updated with additional sample files from process using LO 6.3.1.2.