ncjoes / office-converter

PHP Wrapper for LibreOffice
MIT License
208 stars 77 forks source link

+ Support for filters & html #45

Closed tetreum closed 1 year ago

tetreum commented 1 year ago

Add support for filters, so people can enforce them like:

$converter = (new OfficeConverter($path, "/tmp/"))->setFilter("MS Word 2007 XML");
$converter = (new OfficeConverter($path, "/tmp/"))->setFilter('writer_pdf_Export');

(https://help.libreoffice.org/latest/en-US/text/shared/guide/convertfilters.html)

And also add support for html to pdf|docx which also works.

Those converting from html should add <meta http-equiv="Content-Security-Policy" content="sandbox"> on their files, otherwise the conversion is quite bad.