Forum


Replies: 1   Views: 364
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 5.1.6.2 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: 
/data/www/.config/libreoffice/4/user/basic/Standard/Module1.xba

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?

Thanks!

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

Hello,

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

Regards.