Issue with HTML2PDF, not rendering PDF

Go To StackoverFlow.com

1

For some reason the HTML2PDF/TCPDF is not rendering the PDF... and I have no idea why... :S

render.php (main file)

form.php

(The links will lead you to the code im trying to use, so you can test it, you will only need the HTML2PDF Class)

can somebody tell me why the form isn't rendering??? I'm freaking out!!!

thanx in advance!!

2012-04-04 18:43
by Frank S.
Any particular error you encountered - Jovan Perovic 2012-04-04 18:48
the funny thing is that there is no error catch from the class and neither from php or apache. thats the thing that's freaking me out. I also should point that this is the first time I used HTML2PDF or any PDF generation class, so I hope somebody has a clue.. - Frank S. 2012-04-04 18:53


2

The answer was the execution time.

Solved it by using the set_time_limit() function.

2012-04-05 13:34
by Frank S.


0

Check the webserver logs for any html2pdf-related errors. If you're using apache, command will look like this:

tail -f -n 500 /var/log/apache2/error.log

Updated my answer since if pdf gets rendered but is empty, it's not a permission issue.

2012-04-04 18:51
by BluesRockAddict
BluesRockAddict, have you checked the files, There is no problem with the permissions, when I take out the HTML/form it renders the pdf (empty - Frank S. 2012-04-04 19:03
$html2pdf->writeHTML($content, isset($_GET['vuehtml'])); - looks like the correct name is WriteHTML (i.e. with capital W) - BluesRockAddict 2012-04-04 19:11
I changed it but it didnt make any change. : - Frank S. 2012-04-04 19:20
Do you see any errors in the log - BluesRockAddict 2012-04-04 19:24
no, thats freaking strange... no errors of any kind, just wont render - Frank S. 2012-04-04 19:27
What happens if you do $html2pdf->WriteHTML("

Test

")? Do you get "Test" in pdf or is it still empty - BluesRockAddict 2012-04-04 19:34
HTML2PDF class auto generates the html and body tags, i tried small structures and its all ok, the problem is when I try to load "heavy" form - Frank S. 2012-04-04 19:40
Quick google search indicated that html2pdf doesn't work well with complex html documents, you might want to try using fpdf/mpdf instead - BluesRockAddict 2012-04-04 20:04
Ads