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

            Bug ID: 156477
           Summary: PDF export: Fit Width / Visible make the PDF open with
                    the target large page scrolled down in PDF viewer
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: easyHack, filter:pdf, skillCpp
          Severity: normal
          Priority: medium
         Component: Printing and PDF export
          Assignee: [email protected]
          Reporter: [email protected]

1. Create a new text document;
2. Make its page size A3;
3. File->Export As->PDF;
4. On Initial View tab, keep "Open on page" -> 1, and choose "Fit width";
5. Continue exporting.

=> opening the resulting PDF in e.g. Acrobat Reader will show the first page
not from top, but from its middle. Same thing would happen for "Fit visible".

This is a wrong implementation from start, using /FitBH with a hardcoded
vertical offset "g_nInheritedPageHeight" (A4 portrait hardcoded value) for "Fit
visible"; and also using the same hardcoded value for /FitH (Fit width); when
the actual vertical offset there must come from the actual page itself - or
possibly be omitted, as the standard tells "A null value for *top* specifies
that the current value of that parameter shall be retained unchanged".

Code pointer: PDFWriterImpl::emitCatalog in vcl/source/gdi/pdfwriter_impl.cxx.

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

Reply via email to