-
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
Read and rewrited word2007 document and original document have a lot of differents #620
Comments
Same bug: $filling = new \PhpOffice\PhpWord\TemplateProcessor($template); // $template file is docx
$filling->setValue('foo', 'bar');
$filling->saveAs($tempFile); // Save as docx, match perfectly
// Opening $tempFile (docx) to export in PDF (and in Word2007, html and odt to test)
phpWord = \PhpOffice\PhpWord\IOFactory::load($tempFile, "Word2007");
$xmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'PDF');
$xmlWriter->save($finalPDF);
$xmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
$xmlWriter->save($finalWord);
unlink($tempFile); Regardless of the exported format, the document loses its formatting (it's not the PDF lib) :
It seems that the save processus for My template filled is exactly the same and match perfectly! :) Hopefully a fix soon :) PHPWord version dev-master 38cb04d |
I don't know if the problem I was having was the same as this but this fixed the problem for me |
I have the same problem
this is changing completly the file, and all the style are missed. The footer is added |
should I link to develop repo to composer? |
@troosan finally I could install |
@troosan I am using dev-develop and still experiencing this bug. The template processor can open and save the file without issues but using IOFactory causes the loss of all images, styles and header/footer formatting. |
I also have this problem. Using IOFactory to load a .docx file and wanted to save it into type of html, but lost all the images. Dose this problem solved? |
If you use the developer version of PHPWord, it solves it partially , for me still not acceptable.
Unfortunately I have no time to take a look on the code to find the bug .
I had to change to another library temporally.
… On Mar 28, 2018, at 8:28 AM, jacklove2run ***@***.***> wrote:
I also have this problem. Using IOFactory to load a .docx file and wanted to save it into type of html, but lost all the images. Dose this problem solved?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#620 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABUiAmLVlxyiT1h5T6ailfYPkjp281r1ks5tiy2WgaJpZM4F7ph5>.
|
@Piuliss OK thanks i'll try developer version later but can u tell me what library u are using now? |
No one fixed this?? is possible that nobody create an exporter from 2017 to 2020 from word to PDF starting from template object?? |
I also have this problem. Using IOFactory to load a .docx file and wanted to save it into pdf but lose all my style and formatting :( |
When I read docx and then save it, it doesn't look like original document. It has no equal styles for text block and tables and there are new line breaks.
Example with simple tables:
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: