-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to save/export fillable templateProcessor form docx to pdf? #2180
Comments
You need to use some external tool, like LibreOffice. PHPWord's docx to pdf transformation is very limited. |
I saw your reply on a different issue as well that you used libre to overcome the limitations of phpword, |
Well first you need to install libreoffice on your machine, then you can just take a look at the manual page https://www.systutorials.com/docs/linux/man/1-soffice/ . The command you are looking for is --convert-to. I also suggest you to add the --headless --invisible and --norestore options, since you are just going for a simple conversion, to make the process lighter and more stable. |
install with composer mpdf/mpdf
|
The linked liberary's DOCX to PDF conversion is very limited, similar to PHPWord's. |
ValueError: Invalid or uninitialized Zip object in ZipArchive->getFromName() (line 65 of modules/custom/rental_agreement/vendor/phpoffice/phpword/src/PhpWord/Shared/XMLReader.php).
I am working on Drupal 10 Custom Modules development. Any Solution? |
We are trying to read from docx and replace the variable. But want to save the output as pdf.
Tried:
But the output PDF is a mess.
The text was updated successfully, but these errors were encountered: