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

            Bug ID: 173583
           Summary: Exported PDF embedded table of contents is misordered
           Product: LibreOffice
           Version: 25.2.7.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Feature involved:

In LibreOffice Writer's Navigator pane, headings are organized into a hierarchy
with parents and children. 

When the document is exported as a PDF, a table of contents is generated as an
embedded feature within the PDF metadata(?) based on the libreoffice document's
headings. This occurs even when there is no table of contents in the actual
text of the document. It is a useful and valuable feature for larger
manuscripts.


Observed behavior:

Headings are carefully established to create the desired embedded PDF table of
contents. Some headings are within frames, as required for inline headings
which begin a paragraph but do not consist of the entire paragraph text (i.e.,
IEEE subheading style). In the Navigator pane, headings are organized
correctly.

After exporting as a PDF, the PDF is opened in another application such as
Okular or Firefox and the PDF table of contents is found to be misordered. The
majority of subheadings are under the correct parent heading, however some
subheadings are placed under seemingly random parent headings. They are both
moved upwards to a previous parent headings or much further down the document
to a later parent heading.

All misordered subheadings are within frames.

When a misordered heading was fully deleted, including its frame, then retyped
as body text and re-promoted to a heading, it was again found to be misordered
in the PDF table of contents. However, the incorrect parent of the recreated
heading was found to have changed in the exported PDF from the previous
incorrect parent heading that it had before.

Example:

Libreoffice writer navigator pane headings:

1.
2.
 a)
 b)
 c)
 d)
3.

PDF table of contents: 

1.
 c)
2.
 a)
 d)
3.
 b)


Expected behavior: 

The heading list in the Navigator pane, which includes a specific hierarchy,
should be accurately reflected in the exported PDF table of contents. There
should be no deviation from the heading hierarchy in the Navigator pane and the
table of contents hierarchy in the PDF metadata. 


Version:

25.2.7.2 is the current version available in the Gentoo package library. The
9999 version could not be built. PDF heading errors were also observed 25.8.4,
the current available LibreOffice binary package in Gentoo. It is not possible
for me to test other versions. 


Workaround:

Fully delete the heading with the incorrect PDF hierarchy, including its frame.
Rewrite the text of the heading and repromote it to a heading. Then fully close
Libreoffice. Then reopen libreoffice and reopen the document. Then re-export
the document as a PDF. The heading my appear in the correct hierarchy position,
but only after each of these steps are performed. If any step is not performed,
the PDF table of contents hierarchy error remains.

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

Reply via email to