Hello,
Thanks for sending more information about your question.
There's no option in phpdocx to set the internal ExportFormFields option available in LibreOffice as false. When the formsfields option in transformDocument is set as true, phpdocx uses the ExportFormFieldsToPdf macro to do the transformation, otherwise the default conversion is done.
We have moved this question to the dev team to consider adding a new option in phpdocx to set ExportFormFields as false in a future release of phpdocx.
To set ExportFormFields as false you could use one of the following approaches:
- Use the ExportFormFieldsToPdf macro ((macros-libreoffice/macros/Export forms when transforming to PDF.txt) available in phpdocx but changing it to disable this option:
oPropertyDataValue.Name = "ExportFormFields"
oPropertyDataValue.Value = 0
- Call LibreOffice directly to add new options (https://ask.libreoffice.org/t/export-as-pdf-not-working-in-libreoffice-7-6-2-windows-machine/97272/5) that are not supported by the current stable version of phpdocx (please note that this may require using a newer release of LibreOffice):
soffice --headless --convert-to 'pdf:writer_pdf_Export:{"ExportFormFields":{"type":"boolean","value":"false"}}' --outdir /path/outputs/ /path/document.docx
Regards.