Bug 99680 - Missing images and charts when exporting to PDF (print to PDF works)
Summary: Missing images and charts when exporting to PDF (print to PDF works)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: All All
: high major
Assignee: Thorsten Behrens (allotropia)
URL:
Whiteboard: target:6.0.0 target:5.4.0.1 target:5.3.5
Keywords: bibisected, bisected, filter:pdf, regression
: 97664 102192 103692 (view as bug list)
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2016-05-04 16:32 UTC by Mamoth
Modified: 2020-01-23 19:21 UTC (History)
15 users (show)

See Also:
Crash report or crash signature:


Attachments
The original report (anonimized) (3.85 MB, application/vnd.oasis.opendocument.text)
2016-05-04 16:32 UTC, Mamoth
Details
The result of exporting to pdf (3.31 MB, application/pdf)
2016-05-04 16:34 UTC, Mamoth
Details
Cut-down bugdoc (83.22 KB, application/vnd.oasis.opendocument.text)
2016-05-27 08:05 UTC, Thorsten Behrens (allotropia)
Details
Original ODT (101.47 KB, application/vnd.oasis.opendocument.text)
2016-09-28 09:20 UTC, Francisco
Details
PDF from LibO 4.4.7 (117.58 KB, application/pdf)
2016-09-28 09:22 UTC, Francisco
Details
PDF from LibO 5.0.6 (117.05 KB, application/pdf)
2016-09-28 09:31 UTC, Francisco
Details
OLE object is not in pdf, same object pasted is in pdf (97.38 KB, application/zip)
2016-11-19 05:27 UTC, JPh
Details
Simple test case - original odt (29.55 KB, application/vnd.oasis.opendocument.text)
2017-05-12 15:22 UTC, Ferry Toth
Details
Simple test case -pdf result (21.02 KB, application/pdf)
2017-05-12 15:23 UTC, Ferry Toth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mamoth 2016-05-04 16:32:27 UTC
Created attachment 124844 [details]
The original report (anonimized)

Hello.

I am using LO Writer for a report.
But I just found that when I export the document to a pdf (which is the format in which I am supposed to deliver it to my client), many of the objects (images or charts coming from LO Calc) are simply missing.

Examples : see pages 31, 33, 39, etc ..

More confusing : I have series of charts copied-pasted from the same LO Calc file. It is actually the same chart copied several times but wit different data (I can change it dynamically in Calc), and sometimes the chart appears in the pdf and sometimes it does not.
See pages 41 to 43.
Comment 1 Mamoth 2016-05-04 16:34:45 UTC
Created attachment 124845 [details]
The result of exporting to pdf
Comment 2 Mamoth 2016-05-04 16:37:22 UTC
There might be a connection with bug 89473 : 
https://bugs.documentfoundation.org/show_bug.cgi?id=89473
Comment 3 raal 2016-05-05 12:10:25 UTC Comment hidden (obsolete)
Comment 4 raal 2016-05-05 12:10:25 UTC Comment hidden (obsolete)
Comment 5 Thorsten Behrens (allotropia) 2016-05-27 08:05:54 UTC
Created attachment 125325 [details]
Cut-down bugdoc
Comment 6 Thorsten Behrens (allotropia) 2016-05-27 08:16:08 UTC
Ah well. Ignore the new bugdoc - this looks like random pages missing content, can't even get the same page missing repeatedly after reload...
Comment 7 Xisco Faulí 2016-09-24 14:40:11 UTC
*** Bug 97664 has been marked as a duplicate of this bug. ***
Comment 8 Francisco 2016-09-27 21:04:10 UTC
(In reply to Xisco Faulí from comment #7)
> *** Bug 97664 has been marked as a duplicate of this bug. ***

Hi to all,

I have reproduce this bug using LibO 5.0.6, while the header says the earliest it 5.1. 

Should I change the "earlies version affected"?

Also, I can provide a smaller file in which I'm able to reproduce this bug also.
Comment 9 Timur 2016-09-28 07:45:44 UTC
(In reply to Francisco from comment #8)
> I have reproduce this bug using LibO 5.0.6, while the header says the earliest > it 5.1. Should I change the "earlies version affected"?
From raal's bibisection, it's Bug 44388, so it's even 5.0.2.1. as shown on https://wiki.documentfoundation.org/Releases/5.0.2/RC1.
> Also, I can provide a smaller file in which I'm able to reproduce this bug also.
Good, especially if it's minimum test case where this randomness can be seen.
Comment 10 Francisco 2016-09-28 09:16:43 UTC
(In reply to Timur from comment #9)
> (In reply to Francisco from comment #8)
> > I have reproduce this bug using LibO 5.0.6, while the header says the earliest > it 5.1. Should I change the "earlies version affected"?
> From raal's bibisection, it's Bug 44388, so it's even 5.0.2.1. as shown on
> https://wiki.documentfoundation.org/Releases/5.0.2/RC1.

Ok, so I think it should stated above.

> > Also, I can provide a smaller file in which 
> >I'm able to reproduce this bug also.

> Good, especially if it's minimum test case where this randomness can be seen.

Ok then, uploading the files: original ODT, PDF from LibO 4.4 and 5.0
Comment 11 Francisco 2016-09-28 09:20:03 UTC
Created attachment 127694 [details]
Original ODT

Original ODT file with 6 figures which are OLE objects: one chart and 5 Draw figures.
Comment 12 Francisco 2016-09-28 09:22:00 UTC
Created attachment 127695 [details]
PDF from LibO 4.4.7

PDF from LibO 4.4.7: all figures are present.
Comment 13 Francisco 2016-09-28 09:31:00 UTC
Created attachment 127696 [details]
PDF from LibO 5.0.6

PDF from LibO 5.0.6. Missing figures are 1.2 (pag. 4), and 1.6 (pag. 9)
Comment 14 Xisco Faulí 2016-10-08 11:00:58 UTC
*** Bug 102192 has been marked as a duplicate of this bug. ***
Comment 15 Antoine POURCHEZ 2016-10-21 19:03:58 UTC
I do not agree with the new title, there is no workaround : the print requires another tool (acrobat, ...) ...

As it stands, it is impossible to publish reliably portable documents (PDF) with LibreOffice5 +
Comment 16 SimonB 2016-10-21 19:15:55 UTC
I agree with comment #15, print to PDF is not a workable workaround. Tables of content and some other features are not working.

The only work around I found right now is to have LibreOffice 4.4 installed in parallel. I edit in 5.x and export in PDF in 4.4.  This is an annoying workaround.

Can this issue be fixed ?

SimonB.
Comment 17 AnFr 2016-10-26 09:42:53 UTC
(In reply to SimonB from comment #16)
> I agree with comment #15, print to PDF is not a workable workaround. Tables
> of content and some other features are not working.
> 
> The only work around I found right now is to have LibreOffice 4.4 installed
> in parallel. I edit in 5.x and export in PDF in 4.4.  This is an annoying
> workaround.
> 
> Can this issue be fixed ?
> 
> SimonB.

I agree with the comments #15 and #16.

Additional the workaround using a PDF-printer is not working for professional documents due to the missing links inside the PDF document.

In our company we actually explored the compatibility of LO for our workflow and this BUG is actually the reason why we don't change to LibreOffice 5.x.

I would like to see if this BUG became a higher importance level.

Thanks.

AnFr
Comment 18 Xisco Faulí 2016-11-03 22:50:59 UTC
*** Bug 103692 has been marked as a duplicate of this bug. ***
Comment 19 JPh 2016-11-19 05:27:33 UTC
Created attachment 128856 [details]
OLE object is not in pdf, same object pasted is in pdf

LOO Version: 5.1.6.2 (x64)or portable version
new doc, insert OLE Draw --> not in pdf
then
paste this oject --> pasted in pdf, but original not in pdf
Comment 20 JPh 2016-11-19 05:33:05 UTC
new doc
insert OLE object Draw --> Does not appear in the pdf   docs (V0 & V1)
then
paste this object ---> pasted oject appears in pdf    (doc V2)
Comment 21 Frédéric Buclin 2016-11-21 00:16:22 UTC
This bug report seems to be about exporting to PDF only. But don't you see this problem too when printing your document? This happened many times to me these last few months: some imported Draw images were missing despite I could see them in the Print Preview window. And sometimes, the missing images (= Draw objects) in the generated PDF are not the same ones as the missing ones when printing. Very confusing.
Comment 22 AnFr 2016-11-21 09:54:39 UTC
(In reply to Frédéric Buclin from comment #21)
> This bug report seems to be about exporting to PDF only. But don't you see
> this problem too when printing your document? This happened many times to me
> these last few months: some imported Draw images were missing despite I
> could see them in the Print Preview window. And sometimes, the missing
> images (= Draw objects) in the generated PDF are not the same ones as the
> missing ones when printing. Very confusing.

Hello Frederic.

In the cases used in our company the exports using the print interface (FreePDF and Paper Printer) all Draw OLE objects are correct exported, only the direct PDF export results with missing images.

Regards,
AnFr
Comment 23 JPh 2016-11-21 10:16:06 UTC
Print to pdf works, but I agree with the comments #15 , #16, and #17 due to the missing links inside the PDF document.

It seems to me that this bug appeared in version 3 or at the beginning of versions 4, then had been corrected.
Very disappointing to find it in version 5.
Comment 24 Dominik Kopp 2016-11-21 18:55:13 UTC
(In reply to Frédéric Buclin from comment #21)
> This bug report seems to be about exporting to PDF only. But don't you see
> this problem too when printing your document? This happened many times to me
> these last few months: some imported Draw images were missing despite I
> could see them in the Print Preview window. ...

Yes, in my case OLE object often not printed an real printer.
It's waste of paper. :-(

I've created an own bug report https://bugs.documentfoundation.org/show_bug.cgi?id=103692, but it was marked as duplicate.
I guess, the problem is that LO converts the print job into pdf, before sending it to the real printer.
Comment 25 Antoine POURCHEZ 2016-12-02 12:39:38 UTC Comment hidden (no-value)
Comment 26 AnFr 2017-01-06 10:14:35 UTC Comment hidden (no-value)
Comment 27 Antoine POURCHEZ 2017-02-02 20:41:50 UTC
Regression still present in LO5.3.0...
Comment 28 tydenicek 2017-04-12 11:27:17 UTC
I observe this bug since quite long time. Some objects (mostly LO Draw pictures) are not exported to PDF, though they are visible in print preview and are correctly printed. I must use external pdf virtual printer for export to PDF.
Comment 29 Antoine POURCHEZ 2017-04-12 11:57:30 UTC Comment hidden (no-value)
Comment 30 JPh 2017-05-02 18:04:12 UTC
Bug also in version 5.3.2.2
Comment 31 Francisco 2017-05-02 18:07:38 UTC
> JPh 

The version set is the earliest affected, not the last one.

Please, don't change it to a newer version! Now I can't even set the correct one (5.0.2.1 rc)
Comment 32 Francisco 2017-05-03 16:03:05 UTC
>  Jean-François Fortin Tam

I'd really like to know what has to do this bug, that is about _exporting_ to PDF, with a bug 1) Is about _importing_ from PPTX and 2) it's been already declared as invalid.
Comment 33 JPh 2017-05-03 18:28:27 UTC
(In reply to Francisco from comment #31)
> > JPh 
> 
> The version set is the earliest affected, not the last one.
> 
> Please, don't change it to a newer version! Now I can't even set the correct
> one (5.0.2.1 rc)

Really sorry, excuse me.
Version 4.4.2.2 was not affected
Comment 34 Ferry Toth 2017-05-12 15:20:39 UTC
This issue is becoming super annoying. And seems to be getting worse with each LO version.

In the past I could fix the broken document by putting a white, borderless rectangle around all images.

But now, with 5.3.1.2 linux, amd64 even that does not seem to reliably work.

I attached a simple test case (empty writer doc, except for one draw object).
Fails to create pdf with the drawing on 5.3.1.2 linux, amd64 as well as on 5.2.5.1 windows 10, x86.

This seems to reproduce nicely for testing purposes.

See test.odt and test.pdf.
Comment 35 Ferry Toth 2017-05-12 15:22:45 UTC
Created attachment 133268 [details]
Simple test case - original odt
Comment 36 Ferry Toth 2017-05-12 15:23:19 UTC
Created attachment 133269 [details]
Simple test case -pdf result
Comment 37 Ferry Toth 2017-05-18 13:48:12 UTC
I just fixed one missing Draw object, by dbl-clicking in Writer, the increasing the bounding box on the top side and then sliding the image in the new free space. Now it appears in the pdf.

I wouldn't be surprised if Writer miscalculates the size of the Draw object slightly, and when printing the pdf something is printed outside a bounding box after which the whole image gets discarded.

Unfortunately, there are no error messages on the command line to help track the bug.

Can we get this bug on the Most Annoying Bugs tracker? This really is a pain...
Comment 38 Commit Notification 2017-06-01 00:30:07 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=066665644b398a882e6cded98af5bb060af41d76

tdf#99680 modified clipping for PDF export

It will be available in 5.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 39 Frédéric Buclin 2017-06-01 09:08:14 UTC
(In reply to Commit Notification from comment #38)
> Vasily Melenchuk committed a patch related to this issue.

Thanks for the fix. Will this fix be backported to LO 5.4.0, as the hard code freeze is in one month only?
Comment 40 Commit Notification 2017-06-06 09:53:41 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a915f55c1867c73b3d231afc6e9f6dee17965c00

tdf#99680 unittest to ensure there are no empty clipping regions

It will be available in 5.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 41 Commit Notification 2017-06-14 22:34:46 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cbf371e07fd5dea1ea08a1f299360d1273961ebd

tdf#99680 save graphic state even for empty clipping region

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 42 Commit Notification 2017-06-15 22:58:37 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f6726209329fefe9decca8fda8e136b8472a95a2&h=libreoffice-5-4

tdf#99680 modified clipping for PDF export

It will be available in 5.4.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 43 Commit Notification 2017-06-20 19:54:45 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=581806182ac7da81115c9675b4e828688178aa04&h=libreoffice-5-3

tdf#99680 modified clipping for PDF export

It will be available in 5.3.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 44 Antoine POURCHEZ 2017-07-31 10:10:10 UTC
Test KO

The problem is still present in
Version: 5.4.0.3
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
Threads CPU : 8; OS : Windows 6.2; UI Render : GL;
Comment 45 Timur 2017-08-01 10:41:52 UTC
Looks fixed to me. 
Antoine, if you find that the problem is still present in Version: 5.4.0.3, please write exactly what you tested, which document, and what you got.
Comment 46 Antoine POURCHEZ 2017-08-01 12:15:19 UTC
Je viens de revérifier, et le problème semble également résolu sur mes testcases avec LO 5.4.0.3.
(J'ai du me tromper d'instance LO lors du test hier)
Comment 47 Antoine POURCHEZ 2017-08-01 12:16:25 UTC
I have just re-verified, and the problem also seems resolved on my testcases with LO 5.4.0.3.
(I had to mistake LO instance during the test yesterday)