-
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
Format error with save as HTML and PDF #562
Labels
Comments
@kingspp did you manage to fix the formatting issue because me too hang up with the same issue now. Have you found any solution? |
No, solution using PHPWord framework. You can use xpdf and convert word to PDF in linux using shell_exec(); |
@kingspp Can you paste the installation documentation of xpdf here, it will be helpful |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// Saving the document as HTML file...
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML');
$objWriter->save('helloWorld.html');
I have even tried it with tcpdf api
\PhpOffice\PhpWord\Settings::setPdfRendererPath('tcpdf');
\PhpOffice\PhpWord\Settings::setPdfRendererName('TCPDF');
I am able to output file.html and file.pdf, but the formatting is not present. The given format is applied only when it is saved as .docx file. Otherwise the format does not work on html and pdf files!!
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: