-
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 generate pdf from template #559
Comments
have load pdf library? example: $template->saveAs('result/sampledocument.docx'); |
can you help me, how to load library? |
i had put in in samples/dompdf and i use file /samples/Sample_23_TemplateBlock.php docx created but pdf dont. |
i don't know if in Sample_23_TemplateBlock.php can export to pdf. but in my code require_once 'vendor/phpoffice/phpword/src/PhpWord/Autoloader.php'; \PhpOffice\PhpWord\Settings::setPdfRendererPath('vendor/dompdf/dompdf'); $writers = array('Word2007' => 'docx', 'HTML' => 'html', 'PDF' => 'pdf'); $template = new \PhpOffice\PhpWord\TemplateProcessor('template.docx'); $temp = \PhpOffice\PhpWord\IOFactory::load('result/faktur.docx'); $xmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($temp , 'PDF'); FYI, i'm using slim framework... CMIIW |
i use template so can i export to pdf? On Tue, Jun 30, 2015 at 11:26 AM, Doni [email protected] wrote:
|
where your file location, my file and library dompdf in PhpOffice/samples/ On Tue, Jun 30, 2015 at 11:33 AM, Nhạc vàng mọi thời đại <
|
can you zip for me full lib dompdf? On Tue, Jun 30, 2015 at 11:36 AM, Nhạc vàng mọi thời đại <
|
you can download from here https://github.com/dompdf/dompdf |
Hi, I have the issue, that the format of my documents crashes while converting to pdf... |
i do
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('resources/AF Word.docx');
...
$templateProcessor->saveAs('results/TemplateBlock.docx');
That is good when make docx. But when i use
$templateProcessor->saveAs('results/TemplateBlock.pdf'); => didnot work?
i need a help, thank a lot
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: