Sunday, September 25, 2011

Can't convert html to pdf

I am trying to setup html2ps as described in this tutorial
http://bakery.cakephp.org/articles/Casmo/2010/06/26/creating-pdf-files-with-html2ps-html2pdf
but I keep coming up with this error

Warning (2): DOMDocument::loadXML() [domdocument.loadxml]: Input is
not proper UTF-8, indicate encoding !
Bytes: 0xA9 0x20 0x62 0x69 in Entity, line: 57 [APP\vendors\html2ps
\treebuilder.class.php, line 25]

Notice (8): Trying to get property of non-object [APP\vendors\html2ps
\dom.php5.inc.php, line 26]

Notice (8): Trying to get property of non-object [APP\vendors\html2ps
\dom.php5.inc.php, line 8]

Notice (8): Trying to get property of non-object [APP\vendors\html2ps
\dom.php5.inc.php, line 67]

node object expected, none object resived (C:\xampp\htdocs\bigdojo\app
\vendors\html2ps\box.php:108)

I have done the following:
config/database.php
'encoding' => 'utf8'
config/core.php
Configure::write('App.encoding', 'UTF-8');
views/layouts/*.ctp
<?php echo $html->charset(); ?>
Changed all tables, table data to utf8_unicode-ci (many were
originally set to latin1_swedish_ci) exported the database and created
a new utf8_unicode-ci and inported the data.
I also tried changing the charset to other than utf8 but I get the
same error?
the view I am trying to display as a test has only static html.
what could be causing this issue?
How can I debug this??
Is there a bug in the tutorial code?

Thanks
Robert

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate