Table Content is not coming in PDf after conversion

I have a issue where i am converting a docx into PDf using libreOffice, through command line. But My Table of content is missing from the resulted PDF.

After reading somewhere i came to know that there is some called table index/depth, till that depth only libre office will display the table of content.

I was able to do it from libre office UI, where i updated the table index/depth to 3 or whatever depth i want, after that it started showing those missing heading .

But if i have to pass this table of depth from command line, Is there any way to pass that value ??

Sorry i am not able to upload a image for the issue. So no other option rather than writing the whole thing.

Are you dealing with a DOCX that has been: (a) produced entirely within Word; (b) passed back and forth between Word and Writer; (c) produced entirely within Writer?

I had a similar problem. Checking File - Export as PDF - Tagged PDF seemed to fix it.

Same issue (sorry I double posted it).

My docx was created in MS Word and edited in MS Word only.

When I open the UI and hit export to PDF it works perfectly, without having to change anything.

When running it using command prompt it comes up empty TOC.

It is only this document, other documents just like it work ok and TOC is rendered perfectly in the PDF.

Hoping for some help here, upgrading to latest portable version 4.0.3 did not seem to help.

Which version of MS Word? If it is just the one document, then we will likely need the example document to determine what is going on. It may be bug fdo#46010 (corruption by LO) or fdo#46026 (headless PDF export). There are several other known issues for DOCX and ToC handling e.g., fdo#64511, fdo#64531, fdo#64532, and fdo#65100, but none of those describe your specific issue.

hi, here is the document that causes the problem: http://sdrv.ms/14kRdt3 its the word document there (sharepoint mobile extensions feature admin guide)

I’d appreciate if anyone can confirm they get the same error, or better yet - if you can find a workaround.

Thanks!

Confirmed. Running $ soffice --headless --convert-to pdf:"writer_pdf_Export" --infilter="Office Open XML Text" SharePoint_Mobile_Extensions_Feature_admin_guide1.docx results in a PDF with no ToC entries. Export to PDF via GUI works as expected. It may be a problem with LO not supporting MSO 2013 (v15) via the command line filters.

Thanks Owen,
Anything I can do to report this as a bug?
I don’t really know how this whole LibreOffice development / bug fixes thing work.
I know it is free to use, is support free as well?

Thanks again for taking the time to reproduce!

@Shai, it is all free in libre / open software. Please make your report using the bug submission assistant: https://www.libreoffice.org/get-help/bug/ It is quite easy to use, although you will need to create an account. Please include as much detail as possible in your report and a link to your example file. Also mention that “bug #42871, bug #46026, and bug #46325 appear related, but there are no exactly equivalent open reports I could find.” Oh, and post your bug number back here. Thanks!

Thanks Owen, but reported: #67005 link: https://www.libreoffice.org/bugzilla/show_bug.cgi?id=67005 Hope they get to it, do you know what is the expected cycle of such issues to be fixed? is it weeks, months? just curious… thanks!

Thanks for reporting. There is no way of knowing when the matter will be addressed as it depends on a lot of different factors. I have confirmed the bug so hopefully a developer will take a look in the next few days / weeks. Given that the UI filter exports the ToC OK it may not be a difficult fix, but I can’t say for certain.

I am currently using Libre 4.1.4.2 on Windows and observe the same behavior, the bug link does not show this issue has been resolved either, what are the chances it will be in the near future?

Upgrading can help. I use as a workaround an external pdd-printer and expect you can find a free one.