Solved

TCPDF HTML with Special Characters displays empty PDF file

Posted on 2010-11-09
2
1,929 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
2 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

830 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