Created attachment 163342 [details]
Example document with embedded PDF
Attached user made (in 6.3) document contains an image embedded in the header that was originally a PDF file.
This file contains a larger image that is cropped to show a smaller, relevant portion of the image.
Upon exporting the whole document to PDF the image from the PDF is incorrectly cropped and a different portion of the larger image is visible.
Steps to reproduce:
1. Open attached file
2. Go to the header and select Insert - Image
3. Insert the attached PDF file as image
4. Export the document to PDF
The exported PDF shows a grey box with text “II. AZ EMBLÉMA SZÍNE”
Exported PDF contains the image cropped the same way as in the editor.
Version: 18.104.22.168.alpha0+ (x64)
Build ID: a3e52f63c92876b4a3ac6df61e05b1d3510ba9c9
CPU szálak: 4; OS: Windows 6.3 Build 9600; Felületmegjelenítés: alapértelmezett; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Also happens in
Build ID: 92c2794a7c181ba4c1c5053618179937228ed1fb
CPU threads: 4; OS: Windows 6.2; UI render: GL;
Locale: en-US (hu_HU); Calc: CL
In 5.3 the PDF was not imported cropped in the editor.
In 5.2 and older the export looked correct, although probably because of the placeholder PNG which is also saved.
Bibisected the current state using bibisect-win32-5.4 to:
author Miklos Vajna <email@example.com> 2017-04-05 15:35:13 +0200
committer Miklos Vajna <firstname.lastname@example.org> 2017-04-05 19:07:32 +0200
tdf#106972 vcl PDF export, PDF images: handle indirect font references
Right before this there was only an empty space exported… but before this commit:
author Miklos Vajna <email@example.com> 2017-03-29 09:47:09 +0200
committer Miklos Vajna <firstname.lastname@example.org> 2017-03-29 08:46:52 +0000
vcl PDF export, norefxobj: add UI for this
The correct image (or PDF?) was exported. With current master turning ON the “Use reference XObjects” option on the PDF Export dialog also creates this expected result.
Adding CC to: Miklos Vajna - not necessarily regression, but perhaps an improvement opportunity for the new PDF export method :)
Created attachment 163343 [details]
Example PDF image to embed
Created attachment 163344 [details]
The exported version of the document
Created attachment 163345 [details]
The document exported using reference XObject option
Created attachment 163346 [details]
The document opened in 5.3, shows the larger image uncropped in the editor
Code pointers: if the general "copy objects from pdf image to pdf result" code is broken, then this should be fixed in vcl/source/gdi/pdfobjectcopier.cxx.
If we fail to copy some metadata over from the original pdf image into the pdf result, then this would be in vcl/source/gdi/pdfwriter_impl.cxx, search for "The original page was rotated", that's how rotation is handled.