Bug 106693 - PDF export: option to handle pdf images without reference xobjects
Summary: PDF export: option to handle pdf images without reference xobjects
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-22 11:31 UTC by Miklos Vajna
Modified: 2017-03-28 15:56 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Reproducer document. (11.70 KB, application/vnd.oasis.opendocument.text)
2017-03-22 11:31 UTC, Miklos Vajna
Details
Compressed reproducer (11.73 KB, application/vnd.oasis.opendocument.text)
2017-03-23 13:12 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miklos Vajna 2017-03-22 11:31:13 UTC
Created attachment 132067 [details]
Reproducer document.

Export the attached ODT to PDF.

In case of Adobe Acrobat two options influence the processing of reference XObjects in the export result:

- The directory containing the PDF has to be a privileged location.
  One way to ensure this is to explicitly mark it so, using Edit ->
  Preferences -> Security (Enhanced).

- Reference XObjects View Mode (inside Edit -> Preferences -> Page
  Display) has a 'Show reference XObject targets' setting, set that to
  Always.

In any other readers reference XObjects are simply ignored (can notice that the star is pixel-based in the test doc). So it would be good to have a way to re-export vector-based PDF images without using the reference xobjects markup.
Comment 1 Commit Notification 2017-03-22 16:53:02 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106693 vcl PDF export: initial UseReferenceXObject option

It will be available in 5.4.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 2 Commit Notification 2017-03-23 13:08:11 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106693 vcl PDF export, norefxobj: copy page stream

It will be available in 5.4.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 3 Miklos Vajna 2017-03-23 13:12:25 UTC
Created attachment 132101 [details]
Compressed reproducer

This bugdoc contains a pdf where the page stream is compressed, this currently fails.
Comment 4 Commit Notification 2017-03-23 16:00:40 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106693 vcl PDF export, norefxobj: handle compressed page stream

It will be available in 5.4.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 5 Miklos Vajna 2017-03-24 08:37:26 UTC
Basic support for this is now in, though a couple of additional features are still missing: attachment 131427 [details] from bug 106059 still causes problems.

If you insert that file as an image in Writer and export to PDF, Acrobat is not happy with the output.
Comment 6 Commit Notification 2017-03-24 12:48:16 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106693 vcl PDF export, norefxobj: copy XObject references

It will be available in 5.4.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 7 Miklos Vajna 2017-03-24 14:11:00 UTC
Next problem is the bugdoc has obj 24 which has a reference, and we copy that verbatim to the output, but the reference needs updating.
Comment 8 Commit Notification 2017-03-24 20:34:33 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106693 vcl PDF export, norefxobj: update XObject refs

It will be available in 5.4.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 9 Commit Notification 2017-03-27 09:49:11 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106693 vcl PDF export, norefxobj: copy array objects

It will be available in 5.4.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 10 Commit Notification 2017-03-27 15:32:29 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106693 vcl PDF export, norefxobj: handle multiple refs in copied dicts

It will be available in 5.4.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 11 Commit Notification 2017-03-28 12:50:57 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106693 vcl PDF export, norefxobj: copy nested arrays correctly

It will be available in 5.4.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 12 Commit Notification 2017-03-28 15:54:31 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106693 vcl PDF export, norefxobj: handle multiple refs in copied arrays

It will be available in 5.4.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 13 Miklos Vajna 2017-03-28 15:56:57 UTC
The bugdoc from comment 5 is now exported correctly even in experimental mode, marking as resolved.