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

Convert docx to pdf - header image is not showing #1567

Open
3 tasks
alexia12345 opened this issue Feb 2, 2019 · 1 comment
Open
3 tasks

Convert docx to pdf - header image is not showing #1567

alexia12345 opened this issue Feb 2, 2019 · 1 comment

Comments

@alexia12345
Copy link

This is:

Expected Behavior

Current Behavior

What is the current behavior?
I have docx template with company memorandum in header and footer (combination of image and text). When I convert docx to pdf, I got only text not memorandum image. Is it possible to find fix or to move to another library

Failure Information

Please help provide information about the failure.

How to Reproduce

Please provide a code sample that reproduces the issue.

<?php
require_once 'vendor\autoload.php';
require_once 'vendor\phpoffice\phpword\bootstrap.php';

include_once 'tcpdf/tcpdf.php';

include_once 'tcpdf/examples/lang/hrv.php';

\PhpOffice\PhpWord\Settings::setPdfRendererPath('tcpdf');


$temp = \PhpOffice\PhpWord\IOFactory::load("test.docx");
$xmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($temp , 'PDF');
$xmlWriter->save('test.pdf');


### Context

* PHP version:
* PHPWord version: 0.14
@kaystrobach
Copy link

i think this is related to the way the pdf conversion is done:

DOCX -> HTML -> PDF atleast other user wrote, that it's done that way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants