vcl PDF export: fix re-exporting PDF images with page-level rotation

Desktop / LibreOffice - Miklos Vajna [collabora.com] - 6 November 2019 16:56 EST

PDF images are effectively 1 page PDF documents. The page object may have a /Rotate key, which was simply ignored before. We turn page objects into form XObjects on PDF export, such rotation can be expressed with a /Matrix key.

Add support for the 90 degrees rotation case, this can be generalized later if wanted.

Change-Id: I55a4f63e0b986637ccdeba0b783f1db9a85c4d93 Reviewed-on: https://gerrit.libreoffice.org/82154

bd520b177637 vcl PDF export: fix re-exporting PDF images with page-level rotation
vcl/CppunitTest_vcl_pdfexport.mk | 1 +
.../data/pdf-image-resource-inline-xobject-ref.pdf | Bin 1361 -> 1372 bytes
vcl/qa/cppunit/pdfexport/pdfexport.cxx | 28 ++++++++++++++++++
vcl/source/gdi/pdfwriter_impl.cxx | 32 +++++++++++++++++++--
4 files changed, 59 insertions(+), 2 deletions(-)

Upstream: cgit.freedesktop.org


  • Share