https://bugs.documentfoundation.org/show_bug.cgi?id=156842

--- Comment #11 from Patrick Luby <[email protected]> ---
I took a fresh look at this bug and I no longer think the OSL_FAIL is the
actual cause this bug. AFAICT, PDFWriter::Document is only added in Writer
documents and it is apparently normal to have one or more top level struct
elements other than PDFWriter::Document or PDFWriter::NonStructElement.

So, I decided to relook at the bug to see if I can find what is causing the
scaling. I set the following environment variable and ran LibreOffice from the
command line:

  export VCL_DEBUG_DISABLE_PDFCOMPRESSION=1

This exports to PDF without any compression and I found the following in the
exported PDF file:

  << /Type /XObject /Subtype /Form /Resources << /XObject<< /Im12 12 0 R>> >>
/Matrix [ 0.0002195871 0 0 0.0002254283 0 0 ] /BBox [ 0 0 4554 4436 ]

If I edit the exported PDF manually and multiply the non-zero /Matrix elements
by 8 and divide the non-zero /BBox elements by 8 like in the following line,
the graphic renders at the right size:

  << /Type /XObject /Subtype /Form /Resources << /XObject<< /Im12 12 0 R>> >>
/Matrix [ 0.0017566968 0 0 0.0018034264 0 0 ] /BBox [ 0 0 569  556  ]

So, I suspect scaling should be applied to /BBox instead of /Matrix. Next step
is to find where the above numbers are set in the code.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to