A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearProblem with HTML_ToPDF class (PHP) - page 1
User InfoPosts
Problem with HTML_ToPDF class (PHP)#1
In my project, I(m using HTML_ToPDF PHP class, which uses html2ps script to convert from HTML to PDF file.

Recently I upgrated my production server to Debian 5 (lenny) and, after that, HTML_ToPDF is no longer working:

convert() method from HTML_ToPDF class is returning this error:

Error: there was a problem running the html2ps command.  Error code returned: 127.  setDebug() for more information.


And, the output from html2ps call is:

/usr/bin/perl: symbol lookup error: /usr/lib/perl5/auto/Compress/Zlib/Zlib.so: undefined symbol: Perl_Tstack_sp_ptr


Any help would be appreciated, thanks!

[Edited]
After some tests, I(ve found that the problem happens only with HTML containing images ( tags). When html2ps founds the first image it crashes. Converting HTML without images works fine. Any idea? Thanks!

posted date: 2009-04-17 00:57:00


Re: Problem with HTML_ToPDF class (PHP)#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-17 00:57:01


Re: Problem with HTML_ToPDF class (PHP)#3
This is an issue with the initial conversion from HTML to PS. Usually due to poorly written HTML.Can you show some examples of what you are trying to convert?

posted date: 2009-04-17 02:09:00


Re: Problem with HTML_ToPDF class (PHP)#4
To be honest I(ve found wkhtmltopdf to be far better than html2ps, even though it(s at a fairly early stage of development.I wrote a blog about it, but if you don(t want to read that basically it uses KHTML/Webkit(s rendering engine to render the page which is a bit more sensible than the usual approach of writing a complete HTML renderer.The distributed binary worked just fine on my Debian server, and frankly the results are excellent.

posted date: 2009-04-17 02:39:00


Re: Problem with HTML_ToPDF class (PHP)#5
Sorry, I can't do it due to security reasons. Yes, my HTML is a little poorly written but, trust me, in this case the HTML is not the problem: before Debian update, it was working with same HTML and without problems. Thanks anyway!

posted date: 2009-04-17 03:17:00


Re: Problem with HTML_ToPDF class (PHP)#6
Try thisapt-get install perl=5.8.8-7etch6 perl-base=5.8.8-7etch6 perl-modules=5.8.8-7etch6 debconf-i18n=1.5.11etch2 liblocale-gettext-perl=1.05-1 libtext-iconv-perl=1.4-3 libtext-wrapi18n-perl=0.06-5 libtext-charwidth-perl=0.04-4 html2ps=1.0b5-2 libapache2-mod-perl2=2.0.2-2.4 libcompress-zlib-perl=1.42-2 libfuse-perl=0.07-2+b2 libhtml-parser-perl=3.55-1 libhtml-tree-perl=3.19.01-2 libio-zlib-perl=1.04-1 libwww-perl=5.805-1 perlmagick=7:6.2.4.5.dfsg1-0.14 snmpd=5.2.3-7etch4 xhtml2ps mysql-client=5.0.32-7etch8 mysql-client-5.0=5.0.32-7etch8 libdbd-mysql-perl=3.0008-1 libdbi-perl=1.53-1etch1http://www.deberias.com

posted date: 2009-04-17 04:04:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.