Bug 67005 - Other: DOCX Table of Contents is not converted when using --convert-to command
Summary: Other: DOCX Table of Contents is not converted when using --convert-to command
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
4.0.4.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:4.3.0.4
Keywords: regression
: 70481 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-17 16:21 UTC by Shai Petel
Modified: 2023-08-06 22:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample document with TOC that fails to export to PDF correctly. (1.16 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-07-17 16:21 UTC, Shai Petel
Details
PDF output from v4.3.0.2. (814.71 KB, application/pdf)
2014-07-12 12:48 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shai Petel 2013-07-17 16:21:36 UTC
Created attachment 82549 [details]
Sample document with TOC that fails to export to PDF correctly.

Problem description: 
When using command prompt:
"soffice.exe --nofirststartwizard --invisible --convert-to pdf --outdir %1 %2"
the attached file is exported to PDF without the table of content (TOC). Instead there is a blank space where the TOC should appear.
Doing the same operation using GUI with the same document produces a PDF with the correct TOC.
I confirmed this on several windows OS versions with same consistent result.
The file was created with MS Office 2013, docx file.

Note: I am using LibreOffice Portable version, but had a friend confirm the same with the full version.

Steps to reproduce:
1. Open the attached file using writer, convert to PDF - success. PDF has TOC.
2. Close writer, and all instances of LibreOffice
3. Open command prompt, run the command above (replace %1 with the output location of your choice and %2 with the attached file location)
4. Failure: the PDF is produced but missing the TOC.

Current behavior:
Export to PDF via command prompt does not export TOC, while doing the same via GUI works as expected.

Expected behavior:
Export via command prompt should work the same way as export via GUI, both should include the TOC in the result PDF.
Operating System: All
Version: 4.1.0.2 rc
Comment 1 Owen Genat (retired) 2013-07-19 07:55:36 UTC
Setting status to NEW and version to "4.0.4.2 release" as I have confirmed this under GNU/Linux Crunchbang 11 running TDF/LO v4.0.4.2 (Build ID: 9e9821abd0ffdbc09cd8c52eaa574fa09eb08f2). The problem possibly dates from an earlier version than even the recent one I have indicated. Command used was:

$ soffice --headless --convert-to pdf:"writer_pdf_Export" --infilter="Office Open XML Text" SharePoint_Mobile_Extensions_Feature_admin_guide1.docx

Resultant PDF does not include any ToC entries on p.3. If the DOCX (created using MSO 2013/v15) is opened using the GUI it exports to PDF as expected i.e., including the ToC. The related AskLO answer/query (the thread was originally asked by another user) is:

http://ask.libreoffice.org/en/question/17232/table-content-is-not-coming-in-pdf-after-conversion/?answer=19516#post-id-19516
Comment 2 Mattias Karlsson 2013-10-18 08:38:55 UTC
I see the same problem with LibreOffice 4.1.2.3 (linux_x86-64).

The problem is not only for pdf, the TOC also disappear when I try to convert to doc or odt from docx.

/Mattias
Comment 3 Owen Genat (retired) 2013-10-19 04:45:39 UTC
This problem is more complicated that originally outlined and is a regression from earlier version behaviour. The currently indicated version still seems appropriate, although this required QA/developer confirmation. Keyword "regression" added. I have tested / commented here in detail:

https://bugs.freedesktop.org/show_bug.cgi?id=70481#c3

It would seem likely that bug #70481 is a duplicate, so I am going to close it, although it does provide further test files.
Comment 4 Owen Genat (retired) 2013-10-19 04:48:50 UTC
*** Bug 70481 has been marked as a duplicate of this bug. ***
Comment 5 zmotiwala 2014-02-25 18:34:56 UTC
What is the timeline for a possible fix for this issue?
Comment 6 Filipe 2014-06-11 13:38:34 UTC
i have this issue too with libreoffice 4.2.4.2, i use api java for convert to pdf.

anyone know if this issue dont exist in other version of libreoffice?
Comment 7 cornel creanga 2014-06-19 14:45:01 UTC
hello, any update/timeline on this issue?

thanks.
Comment 8 Niels Søholm 2014-07-08 14:52:44 UTC
Any news on this issue?
Comment 9 Owen Genat (retired) 2014-07-12 12:48:07 UTC
Created attachment 102668 [details]
PDF output from v4.3.0.2.

At some point between v4.2 and v4.3 the headless support for converting the provided DOCX to PDF has been improved. Under Debian 7 x86_64 running v4.3.0.2 Build ID: 14ed55896fdfcb93ff437b85c4f3e1923d2b1409 the PDF generated (attached) via the command in comment 1 now includes the complete ToC as expected. I think this bug can therefore now be RESOLVED as WORKSFORME.
Comment 10 vilpan 2014-12-18 13:23:25 UTC
Reproduced on Debian 7.7 using
Version: 4.2.3.3
Build ID: 882f8a0a489bc99a9e60c7905a60226254cb6ff0

Cannot reproduce using neither
Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0

nor

Version: 4.3.4.1
Build ID: bc356b2f991740509f321d70e4512a6a54c5f243

Closing according to QA FAQ [1].


[1] https://wiki.documentfoundation.org/QA/Bugzilla/FAQ#How_to_terminate_a_Bug_if_it_can.27t_be_reproduced_any_longer