<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Exported PDF of master document with hidden sections in chapters looses pagination"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=144989">144989</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Exported PDF of master document with hidden sections in chapters looses pagination
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.3.0.0 alpha0+ Master
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Writer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>olivier.hallot@libreoffice.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="https://bugs.documentfoundation.org/attachment.cgi?id=175588" name="attach_175588" title="Situation of correct page number of PDF toc">attachment 175588</a> <a href="https://bugs.documentfoundation.org/attachment.cgi?id=175588&action=edit" title="Situation of correct page number of PDF toc">[details]</a></span>
Situation of correct page number of PDF toc

This bug is a follow-up of <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INSUFFICIENTDATA - Repagination on PDF export changes page number in master document with hidden sections"
   href="show_bug.cgi?id=84913">bug#84913</a>, and add sample data for testing and
verification.

The zip file contains all files needed. 

<a href="https://nextcloud.documentfoundation.org/s/t4s5e3GtZe29GPN">https://nextcloud.documentfoundation.org/s/t4s5e3GtZe29GPN</a>

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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>