[Solved] Figure missing in PDF

Writing a book, Automating Document Production - Discuss your special needs here

[Solved] Figure missing in PDF

Postby Horse » Sun Jan 12, 2020 6:33 am

Using Apache OpenOffice 4.1.5 running on Windows 10: I have a book manuscript with a few dozen figures. When I exported the document to .pdf the first figure, and even the entire frame containing it, was missing Several other of the few dozen figures are also missing. Because I am editing an old manuscript, I am not sure of the origin of the figures, but I think they may have been scanned and inserted in a .doc file, which I later converted to .odt. The only other commonality I see is that all the missing frames were for "Illustrations." No "Figures" were omitted. The first two pages the exported pdf are attached. The .odt file is almost a half megabyte, so I can't attach it.
For this demonstration of the omissions, I exported with image resolution set to 100%. When I first encountered the problem, I tried the whole book export at 15%, 22% and 100%, and all omitted several of frames that contained pictures. I have also tested, though not included here, changing the image to only the image and to enclosing it in a Figure frame. Same result in all those cases.
To make the file small enough to attach, I took a corner of the original picture, so the total .odt file was only about 46KB, and then the pdf came out correct. I enlarged the amount of the picture so the .odt file was about 135KB, and the pdf exported correctly. Last year I tried to print a draft of the book, and OpenOffice would not print the whole book. At that time I exported the pdf file and printed it. With fewer figures (but including the one for this two page test version) the pdf exported correctly.
Attachments
Test-R100.pdf
(54.12 KiB) Downloaded 5 times
Last edited by Horse on Tue Jan 14, 2020 7:38 pm, edited 1 time in total.
Lee Higbie
Apache OpenOffice 4.1.5 on Win 10
Horse
 
Posts: 55
Joined: Sat Nov 26, 2011 2:14 am

Re: Figure missing in PDF

Postby Zizi64 » Sun Jan 12, 2020 8:57 am

Please upload the ODF version of the sample file too. Then we will able examine the properties of the document and the embedded pictures.
Note: the file size limit is 128 KiB in this forum. But you can share the larger files on a free file sharing service.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.4; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8644
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Figure missing in PDF

Postby Horse » Tue Jan 14, 2020 6:44 am

Sorry. Thought I posted this yesterday. When I tried to upload the figure I ran into the file size limit. I did put a copy of it on Dropbox at C:\Users\higbie\Dropbox\OpenOffice. I do not know if it visible to you. If not, I hope you can tell me how to fix that. I did try several alternatives, like reducing the picture size so the total file would fit the OO Forum limit, but then the pdf generation worked properly.
Lee Higbie
Apache OpenOffice 4.1.5 on Win 10
Horse
 
Posts: 55
Joined: Sat Nov 26, 2011 2:14 am

Re: Figure missing in PDF

Postby Zizi64 » Tue Jan 14, 2020 10:31 am

I did put a copy of it on Dropbox at C:\Users\higbie\Dropbox\OpenOffice. I do not know if it visible to you.


We can not see your C: drive.
Please give us a link to the file on the Dropbox storage located on the internet.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.4; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8644
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Figure missing in PDF

Postby John_Ha » Tue Jan 14, 2020 1:13 pm

right-click the file in Dropbox > Copy Dropbox link. Paste it here.

Or highlight a few pages where images do not display in the PDF and save as a new .odt. Create the PDF. Upload both files.
AOO 4.1.6, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7120
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Figure missing in PDF

Postby Horse » Tue Jan 14, 2020 7:13 pm

Thank you, John. I am a noob with the Cloud and noob octogenarians need all the help they can get. I know you can’t see my C drive, but thought one might know how to access the file from that info. Here are the links: https://www.dropbox.com/s/avo58z6lspf5o3n/Test.odt?dl=0 and https://www.dropbox.com/s/5vetbjdm61oif ... c.pdf?dl=0
Thank you for your help. I hope you see the same thing I do. I hope the two files are visible to you.
Lee Higbie
Apache OpenOffice 4.1.5 on Win 10
Horse
 
Posts: 55
Joined: Sat Nov 26, 2011 2:14 am

Re: Figure missing in PDF

Postby RoryOF » Tue Jan 14, 2020 7:23 pm

When I used OO 4.1.7, with default settings for /File /Export as PDF, the image exported correctly for me.

 Edit: You have a space immediately in front of "Draft"; this may make your alignment uneven. 
Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 30161
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Figure missing in PDF

Postby Horse » Tue Jan 14, 2020 7:40 pm

Thank you. Seems I have two options: update to 4.1.7 or change the file type of the images. When I cut them from my manuscript, paste into paint, save as (default) .png the insert the png file it works, also.
There are two pieces of information that might have allowed me to fix the problem myself. Perhaps you can tell me how to find them. 1. How can I tell the original file type (bmp, gif, jpeg, …) and size of a picture in a document? 2. How can I find the path for the picture file?
I think my problem originated with a poor choice of file, something that happened long before I received the document. All I know about the original is what I received—namely a pdf file.
[Just learned that "Quick Reply" doesn't post rely.]
Lee Higbie
Apache OpenOffice 4.1.5 on Win 10
Horse
 
Posts: 55
Joined: Sat Nov 26, 2011 2:14 am

Re: [Solved] Figure missing in PDF

Postby John_Ha » Tue Jan 14, 2020 8:04 pm

See [Tutorial] Some useful hints on using images for a discussion on how best to handle images in Writer. It's long but well worth reading.

Photos and paintings etc should be saved as jpg files.

Graphics, text etc should be saved as png, tif or gif files.

Avoid bmp files as they are uncompressed and therefore huge.

If you have an image on the clipboard paste it into an image editor (IrfanView is absolutely magic) and save as the appropriate file format.
AOO 4.1.6, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7120
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Figure missing in PDF

Postby RoryOF » Tue Jan 14, 2020 8:14 pm

I don't know how one can find the type of the file from its inclusion in an OpenOffice .odt file, unless it is linked, which it is not in this case. Internally, the file is stored as a png. Perhaps John_Ha would try an Export as pdf on your sample ,odt file to see if the image does export as a pdf.
Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 30161
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Figure missing in PDF

Postby John_Ha » Wed Jan 15, 2020 12:23 am

RoryOF wrote:I don't know how one can find the type of the file from its inclusion in an OpenOffice .odt file, unless it is linked, which it is not in this case. Internally, the file is stored as a png.

Rory.

That's not quite correct. See the Tutorial.

Any image pasted into AOO is stored as a png as it is a lossless compression.

Any image file dragged into AOO or inserted by File > Insert ..., is stored as itself.

If you unzip an .odt file and look in \Pictures you can see the various formats. The images in this file are all identical 1000 x 1000 graphics images - note the variation in sizes! The TIF is tiny because I used Fax compression which is black and white only so only 1 bit per pixel.

Clipboard01.gif

RoryOF wrote:Perhaps John_Ha would try an Export as pdf on your sample ,odt file to see if the image does export as a pdf.

It exported to PDF perfectly. The photo had obviously been pasted into AOO because it was stored as a 483 kByte png file. I extracted it and converted it to a greyscale JPG at 85% Quality Factor ant it was only 72 kByte. There was no difference in quality.
AOO 4.1.6, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7120
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Figure missing in PDF

Postby John_Ha » Wed Jan 15, 2020 1:14 am

I have just had a thought how images could go missing when the PDF is created. If the images are in the .odt file they will appear in the PDF as there is no way to prevent them.

Hence they must be missing from the .odt file. If they are linked and the .odt file has been moved then the linked images will not appear. So, for example:

1 Create a .odt file in ...\Documents\MyBook
2 Add image_1 as embedded
3 Add image_2 as linked where the image file is also in ...\Documents\MyBook
4 Save the file.

All looks OK - the file has two images in it. Create a PDF and it has two images in it.

5 Move the .odt file to the desktop.
6 Open the file and create a PDF. If image_2 is on, say, page 11 and you did not scroll down to page 11, you would not see that it is missing.

This PDF will have image_1 in it but not image_2 because AOO cannot find the image - AOO is looking in the same folder - the desktop - as the .odt file but the image is in ...\Documents\MyBook.

Go Edit > Links ..., to show if any images are linked because linked images have their full path given. If there are linked images, and they are showing, you can break the links and make them embedded.

Clipboard01.gif
Edit > Links
AOO 4.1.6, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7120
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK


Return to Advanced Uses

Who is online

Users browsing this forum: No registered users and 2 guests