Skip to content
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

Open
kingspp opened this issue Jun 25, 2015 · 3 comments
Open

Format error with save as HTML and PDF #562

kingspp opened this issue Jun 25, 2015 · 3 comments

Comments

@kingspp
Copy link

kingspp commented Jun 25, 2015

// 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.

@prabhakaran8737
Copy link

@kingspp did you manage to fix the formatting issue because me too hang up with the same issue now. Have you found any solution?

@kingspp
Copy link
Author

kingspp commented Aug 8, 2015

No, solution using PHPWord framework. You can use xpdf and convert word to PDF in linux using shell_exec();

@prabhakaran8737
Copy link

@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
Development

No branches or pull requests

3 participants