Forum


Replies: 3   Views: 2236
Editable form fields after conversion from docx to pdf
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 bhollinger  · 23-08-2019 - 07:19

Hallo,

does phpdocx allow editable form fields of a docx document to carry over to the pdf when converting (producing an editable field in the final pdf)?

I found this ticket which asks the same question but it is flagged as "feature may be implemented by now".

https://www.phpdocx.com/en/forum/default/topic/1663

Is the answer in that ticket still current? The documentation isn't quite clear on that topic.

Thank you for your help.

 

Best regards,

Benjamin Hollinger

Posted by admin  · 23-08-2019 - 07:51

Hello,

phpdocx 9 added new options to the conversion plugin based on libreoffice to export comments, form fields and do a lossless compresion. On https://www.phpdocx.com/news/post/phpdocx-v9-release-notes/218 you can read all features included in this version.

The API method (https://www.phpdocx.com/api-documentation/format-conversion/convert-Word-docx-into-pdf-with-PHP) also explains these and other options.

We recommend you to check the docs folder included in the package to learn how to use these options.

Regards.

Posted by bhollinger  · 23-08-2019 - 08:00

Thank you for the quick response!

Just for clarity's sake: the documentation says "export form fields". Does that mean that in the resulting pdf document the form field is then editable, or does it mean that only the current value of the form field is displayed in the created document as mentioned in the ticket I linked?

Thanks again for your assistance!

Posted by admin  · 23-08-2019 - 09:09

Hello,

That option exports form fields and its values. This is for example an input field or a dropdown field, if you open the PDF with any program such as Adobe, Foxit or Google Chrome you can change both fields (input and dropdown) and save the changes.. It needs using structure document tags (https://www.phpdocx.com/api-documentation/word-content/add-structured-document-tag-Word-document-with-PHP).

You can test it manually using LibreOffice. You can open the DOCX with LibreOffice and then choose File->Export As->Export As PDF , in the next window you need to enable Create PDF form (FDF format). phpdocx does the same process but with the transformDocument method and a single line of PHP.

Regards.