The Advanced and Premium licences of phpdocx include the conversion plugin. Its purpose is to convert document formats while keeping their content and visual style at the same time.
The main goal of the conversion plugin is to transform DOCX documents to PDF and HTML. However, it is also compatible with many other formats. This way you can work with the following document formats: DOCX, PDF, (X)HTML, DOC, ODT, PNG, RTF and TXT.
The conversion plugin is multi-platform and compatible with Windows, Linux and macOS. Once installed, it is as easy to use as executing this PHP line of code:
Since the release of phpdocx 8, Advanced and Premium license includes native PHP classes to transform DOCX to HTML:
Thanks to the conversion plugin it is possible to perform the following conversions:
Due to format limitations, the PNG transformation only generates the first page of the document.
This way, the phpdocx functionalities allow you to achieve almost any type of conversion.
These are the most usual test cases when working with the phpdocx conversion plugin:
- Generate DOCX files from scratch or from templates and convert them to PDF.
- Create a WYSIWYG HTML editor with CKEditor (or any other editor), convert the resulting HTML to DOCX and finally transform it to PDF, DOC and so on.
- Transform DOC, ODT and RTF files to DOCX to modify their contents with phpdocx.
- Convert DOCX files to HTML and embed them in a WYSIWYG editor. This allows to edit it online, then converting it again to DOCX to lastly transform it to PDF, PNG, DOC and so on.
- Convert DOCX files to PDF or PNG to preview it in browsers.
Apart from the features of the conversion plugin explained so far, phpdocx adds support for the following options:
- Generate PDFs in PDF/A-1 format
- Automatic generation of the Table of Contents (TOC)
- Default configuration for CKEditor
- Options to improve the final output of the documents
- Obtaining statistics of pages, images, tables...
- Support to run MS Word on Windows servers to generate the documents
Please visit the conversion plugin documentation page.