Replies: 1   Views: 2386
Libraoffice convert pdf toc doesn't work anymore
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by arie  · 06-02-2019 - 13:45

Hi there community!

Since recent the conversion of my DOCX to PDF using the macro which automatically creates the TOC in the pdf doesn't work anymore. I'm using PHP 7.0 with LibreOffice 10m0(Build:2).

The command that is run is the following: 

soffice --invisible "macro:///Standard.Module1.SaveToPdfToc(/documents/6104875e1a913bb1f781c3983ff8a6b3.docx)"

It used to work but for some reason it doesnt anymore. The macro is located here: 

Notice that when I run the normal command without the TOC conversion the conversion succeeds and the PDF is generated:
soffice --headless --convert-to pdf --outdir "/documents/" "/6104875e1a913bb1f781c3983ff8a6b3.docx"

Does anyone can help / experience the same issue?


Posted by admin  · 16-04-2019 - 17:38


The problem was related to missing permissions when trying to read the macro used to generate TOC contents.