Bug 116254 - Writer: pdf-images disappear in some viewers when exporting, because PDF does not conform to PDF/A
Summary: Writer: pdf-images disappear in some viewers when exporting, because PDF does...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, regression
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
Reported: 2018-03-07 05:51 UTC by oli4stuker
Modified: 2021-12-03 05:38 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

pdf that doesn't get printed (15.95 KB, application/pdf)
2018-03-07 11:32 UTC, oli4stuker

Note You need to log in before you can comment on or make changes to this bug.
Description oli4stuker 2018-03-07 05:51:18 UTC
When embedding a pdf as an image, the image is printed blank when the document is exported as pdf.

Steps to Reproduce:
1. New Writer document
2. Insert > Image... > choose any pdf that wasn't created with LO and open *
3. Add some text
4. Export as PDF **

* doesn't matter if embedded or linked
** doesn't matter if using the toolbar button "Export as PDF" or File > Export as PDF...

Actual Results:  
Text is visible, but image is not in exported pdf file

Expected Results:
Image should be visible in exported pdf file too

Reproducible: Always

User Profile Reset: No

Additional Info:
- It seems to work with pdf files that were created with LO, but not with others e.g. pdf files created by InkScape. If desired, I can provide pdf files.

- It worked as expected in

- About:
Version: (x64)
Build ID: 79c9829dd5d8054ec39a82dc51cd9eff340dbee8
CPU threads: 8; OS: Windows 6.1; UI render: default; 
Locale: de-CH (de_CH); Calc: group

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.168 Safari/537.36 OPR/51.0.2830.40
Comment 1 sam tygier 2018-03-07 11:29:02 UTC
I can reproduce with an inscape produced pdf in 5.4.3
Build ID: 92a7159f7e4af62137622921e809f8546db437e5
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.utf8); Calc: group
Seems to effect Write and Impress equally.
(Though Bug 104998 makes 5.4 useless for working with embeded pdf files).

I can't reproduces in:
Build ID: 79c9829dd5d8054ec39a82dc51cd9eff340dbee8
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.utf8); Calc: group
Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.utf8); Calc: group

Could you upload the pdf file that triggers this for you.
Comment 2 oli4stuker 2018-03-07 11:32:49 UTC
Created attachment 140426 [details]
pdf that doesn't get printed

When I load this pdf into a Writer document (via Insert > Image...) it doesn't show when the Writer document is exported as pdf
Comment 3 Telesto 2018-03-07 12:03:29 UTC
Repro with attachment 140426 [details]
Build ID: e108a31a8fee09c2fa4031e45e45ed73bbdb7c6f
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-03-03_23:36:02
Locale: nl-NL (nl_NL); Calc: CL
Comment 4 Dieter 2018-03-07 21:00:09 UTC
Can't reproduce with attachment 140426 [details] and

Version: (x64)
Build ID: d64ce643275e0b2b0dea9e532fc261391dc8793c
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-03-01_03:24:30
Locale: de-DE (de_DE); Calc: CL

So if you, Telesto are able to reproduce it with the master, it might depends on the setings of the PDF-Export?
Comment 5 Telesto 2018-03-08 10:04:51 UTC
A, I found an explanation for the difference. The PDF contains the image, but not every PDF reader can handle it.

Windows Build in PDF reader -> No image
PDF XChange Viewer -> No image
Comment 6 Dieter 2018-03-08 10:37:52 UTC
I use Adobe Acrobat Reader DC
Comment 7 Telesto 2018-03-08 10:50:38 UTC Comment hidden (obsolete)
Comment 8 Buovjaga 2018-03-08 12:17:53 UTC
(In reply to Telesto from comment #7)
> @Buovjaga,
> Is this 'by design' - please use a different PDF-reader (similar as bug
> 104702) - or ...

Miklos: is this notourbug?
Comment 9 Miklos Vajna 2018-03-09 09:27:39 UTC
https://www.pdf-online.com/osa/validate.aspx output for our pdf output:

> File	saved.pdf
> Compliance	pdf1.4
> Result	Document does not conform to PDF/A.
> Details	
> Validating file "saved.pdf" for conformance level pdf1.4
> The name a0 of a graphics state dictionary resource is unknown.
> The document does not conform to the requested standard.
> The document doesn't conform to the PDF reference (missing required entries, wrong value types, etc.).
> The document does not conform to the PDF 1.4 standard.
> Done.

So it's a bug.
Comment 10 QA Administrators 2019-03-10 03:19:16 UTC Comment hidden (obsolete)
Comment 11 Timur 2020-03-23 11:27:23 UTC
This can be tested from 5.3 when PDF image could be inserted. And I could open an image from 5.3. with PDF-XChange Viewer. So I'll ask bibisectRequest.
As noted, from 5.4 probably all up to 7.0+ inserted PDF images is not seen, except with Adobe.
Comment 12 Buovjaga 2020-03-23 16:57:18 UTC
Miklos: I bibisected using the PDF Tools Online Validator (repo win32-5.4). I was pointed to a range of commits https://gerrit.libreoffice.org/plugins/gitiles/core/+log/ff8b873936aa72b17309da4bfc2775573a5b1f55..169bd7718264b0e312052757f9bbd2321e1399c2