Forum


Replies: 19   Views: 5711
Issue with transformdocx
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 efenel  · 27-11-2013 - 17:51

Hi,



I generates a docx and would transform it into pdf like this:



     $docx-> createDocx ($path);

     chmod ($path, 0777. 'docx.');

    

     / / $docx-> transformDocxUsingMSWord ($path, $path. 'docx.'. 'pdf.');

     $docx-> transformDocx ($path, $path. 'docx.'. 'pdf.');

     chmod ($path, 0777. 'pdf.');



Locally on windows, no problem but on my CentOS 64bit linux server, I get this error in the log message:

phpdocx_logger INFO Running in compatibility mode. Unsupported method.



--- 



check.php all is ok



i have installed :



- jre



- glibc.i686, libstdc++.i686, xulrunner.i686



Do you have an idea for solve my problem ?


Posted by jorgelj  · 28-11-2013 - 08:09

Hello,



Is your script  adding content to a DOCX or you only need to transform DOCX to PDF?



Regards.


Posted by efenel  · 28-11-2013 - 09:16

hi,



Yes, my script add and replace variable by content. Then i transform docx to pdf.


Posted by jorgelj  · 29-11-2013 - 07:49

Hello,



It seems you're using some method that is not compatible with the plugin transformation like addHTML or addDOCX. Please check this:



http://www.phpdocx.com/help/conversion-plugin-docx-to-pdf#12



If you want to avoid that message you can use TransformDocAdv.inc class.



Regards.


Posted by efenel  · 02-12-2013 - 12:32

Hi,



I try to use the method $docx->enableCompatibilityMode(); who allow use TransformDocAdv but now, i get this error :



Fatal error: Class 'TransformDocAdv' not found in .../lib/PHPDocx/classes/CreateDocx.inc on line 768



Have you any idea, i need to make it work to buy this library.


Posted by jorgelj  · 02-12-2013 - 13:18

Hello,



What version of PHPDocX are you using?



Regards.


Posted by efenel  · 02-12-2013 - 13:48

I use the version 3.5.1 trial.


Posted by efenel  · 02-12-2013 - 13:55

Forgoten : My trial is expired but i need to be sure that it work before buy. 


Posted by jorgelj  · 02-12-2013 - 13:58

Hello,



The trial version doesn't include the conversion plugin.



You'll only be able to use thie method:



http://www.phpdocx.com/api-documentation/format-conversion/generate-pdf-from-Word-template



Thats is useful for simple documents.



Regards.


Posted by efenel  · 02-12-2013 - 16:11

Thanks you but now i have this error :



Warning: ZipArchive::extractTo(): Permission denied in /var/www/***/**/lib/PHPDocx/classes/AutoLoader.inc(2) : eval()'d code on line 2 Fatal error: Call to undefined function imagecreatefrompng() in /var/www/ims/ims/lib/PHPDocx/pdf/lib/class.pdf.php on line 4204



 



For try, i have make a chmod 777 -R on folder PHPDocx and on all the document docx.Despite of it the problem persists. :/  


Posted by jorgelj  · 02-12-2013 - 16:31

Hello,



This error: Fatal error: Call to undefined function imagecreatefrompng comes if your server doesn't include php gd. You just need to install it.



Regards.


Posted by efenel  · 02-12-2013 - 17:52

Thanks you, i have the error yet :



ZipArchive::extractTo(): Permission denied in /var/www/ims/ims/lib/PHPDocx/classes/AutoLoader.inc(2) : eval()'d code on line 2



But the pdf is generated (with a bad/incomplete layout :/)



I think, i'm going to buy this library version corporate now but you think i can get a better result than actually with generatePDF()  


Posted by jorgelj  · 03-12-2013 - 08:51

Hello,



Yes, the corporate version outputs a much better PDF than generatePDF method. If you want attach a DOCX and we'll transform it to PDF so you can see the output.



Regards.


Posted by efenel  · 03-12-2013 - 10:01

Hello,



My boss wants a certainty that it will work before investing, here is the config. our server:



Centos 6.4



PHP 5.3.3



Apache 2.2.15



symfony 1.4.19



And what I currently get with generatepdf :/



http://hpics.li/bc2d3a9  (version docx good)



http://hpics.li/1e20700 (version pdf not good)



Thank you to confirm me with my config. PDF conversion work well with corporate version.


Posted by jorgelj  · 03-12-2013 - 11:11

Hello,



If you attach the DOCX file we'll transform it to PDF using the conversion plugin.



Regards. Jorge.


Posted by efenel  · 03-12-2013 - 11:27

Can you take me a mail address for i can send the docx to you ? (i can't attach here)


Posted by jorgelj  · 03-12-2013 - 12:07

Hi,



This is the output using the conversion plugin:



http://speedy.sh/UBYVV/demande-031213-1053-2.pdf



As you can see is very similar to the original doc, although one can do some minor changes in the template to get the exact result. We have removed the background image from your document to get a cleaner PDF.



Regards.


Posted by efenel  · 03-12-2013 - 12:15

ok for me it's good, i show that at my boss and i think we going buy corporate version.



Thank you very much.