Forum


Replies: 5   Views: 3104
Pdf generation where the document contain text boxes
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by colinw  · 22-06-2011 - 09:42

When trying to generate a PDF version of the created DOCX from a pre-defined template that has text boxes in it, the PDF generated is totally mis-aligned. The text box appears as a large red X as if an "image" is missing. Basically rendering the created PDF useless and not representing the original DOCX document.

Any help on how to get around this would be greatly appreciated, as PDF creation is an essential step in the process required.

Posted by usef  · 11-04-2013 - 12:13

I'm having the same problem, HELP!!

Posted by champton  · 11-04-2013 - 12:13

My images dont show up. I just get a big red x

Posted by wpierson  · 11-04-2013 - 12:13

I'm having the same issue. Images are big red x's and the alignment is off as well. Haven't figured out a fix for this

Posted by admin  · 11-04-2013 - 12:13

Hi,

The next version of phpdocx will solve images issue.
Meanwhile, apply this patch:

Index: TransformDoc.inc
===================================================================
--- TransformDoc.inc (revision: 175)
+++ TransformDoc.inc (revision: 176)
@@ -243,8 +243,8 @@
$package->getFromName('word/_rels/document.xml.rels')
);
$pathImgs = array();
- foreach ($relationsImgs->relationship as $relImg) {
- if ($relImg["Type"] == cTransformDoc::SCHEMA_IMAGEDOCUMENT) {
+ foreach ($relationsImgs->Relationship as $relImg) {
+ if ($relImg["Type"] == TransformDoc::SCHEMA_IMAGEDOCUMENT) {
$pathImgs[(string) $relImg["Id"]] =
(string) $relImg["Target"];
$pathZip[] = 'word/' . (string) $relImg["Target"];

Regards.