?
Solved

TCPDF HTML with Special Characters displays empty PDF file

Posted on 2010-11-09
2
Medium Priority
?
2,078 Views
Last Modified: 2012-05-10
Hi All ,

I am using TCPDF Library Version: 5.9.011. I am trying to execute HTML layout as PDF. For which I tried with example provide with the site

$html = '<h1>HTML Example</h1>
<h2>List</h2>
Some special characters: &lt; € &euro; &#8364; &amp; è &egrave; &copy; &gt; \\slash \\\\double-slash \\\\\\triple-slash
';
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');

//Close and output PDF document
$pdf->Output('example_006.pdf', 'I');

Open in new window


Apparently found that generated PDF only default header and footer with middle content blank.

However if I remove special characters like:

$html = '<h1>HTML Example</h1>
<h2>List</h2>
Some special characters:
';

Open in new window


PDF gets its middle content as specified in $html

Am I missing something or doing something wrong?

Please help me to rectify.
0
Comment
Question by:teenashah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 34107569
I was finally able to get that to run and generate the correct file with PHP 5.2.11 on WAMP on Windows XP after I set the 'max_execution_time' to 120 seconds.
0
 

Author Closing Comment

by:teenashah
ID: 34612851
For little bit HTML contents it works, but huge HTML forms still not possible.
0

Featured Post

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question