I'm trying to print a page with a custom view (block). I have successfully added the
print theme('blocks', 'content') line into my print.tpl.php. However, when I attempt to print this page, I get:
TCPDF error: Wrong page number on setPage() function.
and the logs contain:
# warning: Division by zero in /home/tactusca/public_html/intranet/sites/all/modules/print/tcpdf/tcpdf.php on line 8965.
# warning: array_push() [function.array-push]: First argument should be an array in /home/tactusca/public_html/intranet/sites/all/modules/print/tcpdf/tcpdf.php on line 9012.
# warning: array_push() [function.array-push]: First argument should be an array in /home/tactusca/public_html/intranet/sites/all/modules/print/tcpdf/tcpdf.php on line 8729.
Any idea what may be wrong here ?
Thanks !
Stefan
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | upcoming.html_.gz | 2.14 KB | stefan_seefeld |
Comments
Comment #1
jcnventuraTCPDF is a nightmare when placing stuff in the footer. After rc9, I did a few fixes which even remove any possible footer blocks from the TCPDF page to try to simplify stuff.
I will need to have the contents of the printer-friendly version of the page you're trying to transform into a PDF to undertand the problem.
João
Comment #2
stefan_seefeld commentedThusly attached. Thanks !
Comment #3
stefan_seefeld commentedSorry, that doesn't appear to have worked. Here it is again.
Comment #4
stefan_seefeld commentedRaising this issue to 'critical' as more and more users of my site run into this bug.
Thanks,
Stefan
Comment #5
jcnventuraHi,
After analyzing the file you provided, I have concluded that the problem is TCPDF's lack of support for divs inside tables. There is nothing I can do, except to recommend that you try dompdf instead.. Of course, then you won't get Unicode characters support, so I think you're in a catch-22 where you can't use any of the two libraries.
Feel free to submit a bug report in TCPDF's bug tracker.
João
Comment #6
stefan_seefeld commentedJoao,
can you provide some more specifics as to what HTML will result in the tcpdf failure ?
I downloaded tcpdf, modified an example to include a table with a div element in a td, and all seems to work fine, so I'm not sure what the failure is.
Thanks,
Stefan
Comment #7
jcnventuraHi,
Actually it's my fault.. The support for divs in TCPDF used to be so bad that I was doing some stuff to make it look good that broke support for divs inside tables..
I will try to fix it soon.
João
Comment #8
stefan_seefeld commentedOK, thanks, that's much appreciated.
Comment #9
jcnventuraHi,
I just committed some code that doesn't break the TCPDF when divs are inside tables.. The next dev to be built should be OK.
João
Comment #10
stefan_seefeld commentedGreat, thanks !
Do you have any plans to do another (non-dev) release anytime soon ?
Comment #11
jcnventuraHi,
It's only been a week since I have released 6.x-1.0, so I will possibly wait around 2 weeks more to see if anyone reports any other errors.. In the meantime, I have to find some time to also add some of the postponed stuff into 1.1.
João
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.