[Libreoffice-bugs] [Bug 144989] New: Exported PDF of master document with hidden sections in chapters looses pagination

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Oct 8 01:34:03 UTC 2021


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

            Bug ID: 144989
           Summary: Exported PDF of master document with hidden sections
                    in chapters looses pagination
           Product: LibreOffice
           Version: 7.3.0.0 alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: olivier.hallot at libreoffice.org

Created attachment 175588
  --> https://bugs.documentfoundation.org/attachment.cgi?id=175588&action=edit
Situation of correct page number of PDF toc

This bug is a follow-up of bug#84913, and add sample data for testing and
verification.

The zip file contains all files needed. 

https://nextcloud.documentfoundation.org/s/t4s5e3GtZe29GPN

The archive contains

GS70-GettingStarted.odm 
------------------------
* A master doc  linking all chapters.
* On page 3 of the master doc there is a string "book [0|1]. 0 or 1 is a
variable field controlling hidden sections in the chapters. 
* When 'book eq 1', the chapter sections containing the heading "Copyright..."
are hidden and the hidden section are not visible nor printed.
* When 'book eq 0', the chapter sections containing the heading "Copyright..."
are not  hidden and are visible and printed.
* Open the master document and update the links as usual.

GS70NN-(..).odt
----------------
* Chapter files.
* All chapter files have a section with condition "book eq 1" wrapping the
Copyright heading and the chapter TOC. When 'book eq 1' the section is hidden.

0.pdf
-----
A pdf file where 'book eq 0', meaning that all sections are visible.

1.pdf
-----
A pdf file where 'book eq 1', meaning all chapter's copyright + TOC are hidden.

Actual results
--------------
The screen shots shows the issue

Screenshot_0.pdf.png shows a PDF reader with PDF "Contents" on the right,
accessing heading "Changing formula color". The PDF page is correctly displays
showing the heading. The PDF ToC shows page 342 and the PDF page is actually
342. That is OK.

Likewise, Screenshot_1.pdf.png access heading "Changing formula color" on page
313 but the heading target is lost. The page number does not correspond to the
heading "Changing formula color". Actually the "Changing formula color" heading
is located in page 337 of the PDF file.

Expected results
----------------
with hidden sections actually hidden, the page numbers of the exported PDF
contents right pane should point to the right page in the file. In the case
above, instead of "Changing formula color" on page 313, it should be "Changing
formula color" on page 337.

Note
----
The issue (page number offset) is even more visible when TOC points to the end
of the PDF file, higher chapters. The issue is not visible in the beginning of
the file (lower chapters)

It seems that the offset depend on the number and size of the hidden sections.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20211008/a604595b/attachment.htm>


More information about the Libreoffice-bugs mailing list