Closed (fixed)
Project:
Printer, email and PDF versions
Version:
6.x-1.10
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
4 Feb 2010 at 11:56 UTC
Updated:
10 Jul 2010 at 00:21 UTC
Hello, I use TCPdf for making pdfs. On some nodes, I get a pdf with only the 2 lines at bottom and at the top and the numer of the page on ther bottom-right corner. See the attached file. With these nodes printer and email modules work correctly. What could be the problem?
Thanks for answer.
Comments
Comment #1
suydam commentedI'm having the same issue.
What's more, a reporting piece I wrote (that uses manual calls to tcpdf) works just fine.
Drupal 6.15
print.module 6.x-1.10
TCPDF 4_8_022
Comment #2
marrch_caat commentedThe same problem occures both on 6.x-1.10 version with tcPDF v. 4.8.016 and after upgrade to the latest 6.x-1.x-dev with the latest tcPDF 4.8.036.
Comment #3
marrch_caat commentedMy investigation leads me to the function _print_pdf_tcpdf() in the print_pdf.pages.inc, to the following lines:
When I replace them with the following:
- everything works fine.
Comment #4
frayber commentedIt worked for me!!!
Thank you
Comment #5
marrch_caat commentedRe-opened the issue so that the module maintainer could notice it and submit the patch to the next release.
Comment #6
victorcoder commentedsubscribing
Comment #7
jpulles commentedThis bug seems more or less critical ;-)
The patch above solved the problem when pages with a large table and inline styles failed to print.
Thanks for the solution!
Comment #8
moque commentedHello, I use TCPdf for making pdfs too.
I have use the patch "_print_pdf_tcpdf() in the print_pdf.pages.inc" but my pdf is already empty.
Name: TCPDF
Version: 4.9.015_PHP4
Release date: 2010-04-20
Can you help me ?
Thanks you.
Comment #9
garbo commentedI consider this bug critical as well.
And the solution at #3 by marrch_caat fixed the problem for me!
Thanks!
Comment #10
sheetal.nepte commentedI am also getting empty page even after applying the above patch.
I have tried with both dompdf and TCPDF.
Please help me. :(
Comment #11
jcnventuraI've just committed this fix to CVS. Thanks!
moque and sheetal.nepte, I will need a URL to the page giving you problems so that I can try to figure out the problem..
Comment #13
vcardoso commentedHi João,
I'm facing the same issue after upgrading to Drupal 6.17 and PHP 5.3 (I'm not sure witch one is the responsible). Bellow I'll try to detail the environment for this situation.
Issue
- the "print to pdf" option does not work, it returns a complete blank page (checked it with crtr+u under Firefox)
Development environment
- localhost (Ubuntu 10.04 machine)
- php 5.3.2-1ubuntu4.2
- drupal 6.17
- print-6.x-1.10
- tcpdf_5_5_004
I've tried with the dev version (print-6.x-1.x-dev), but the result remains identical with the additional error message (on the admin area):
- "warning: Parameter 1 to theme_print_pdf_tcpdf_header() expected to be a reference, value given in /home/victor/www/d617-sandbox/includes/theme.inc on line 656."
Also, with the stable version (print-6.x-1.10), I've applied the patch #3 but without any success.
It worked just fine under drupal 6.15 and Ubuntu 09.10 (I'm not sure what was the PHP version at the time).
Thanks in advance for your help.
Victor Cardoso
Comment #14
adrien.gibrat commentedIMHO,
the patch #3 correct a bad pattern ( .*? can eventually "eat" everything)... it's working and resolves a lot of case, it should be commited to the next release!
Comment #15
adrien.gibrat commentedOops... i closed the ticket by mistake... it's still true on 6.x-1.10 version... the patch resolves my empty pdf problems ;)
Comment #16
gausarts commentedSubscribing. Thanks
Comment #17
jcnventuraPlease don't reopen old issues. #13 seems to be a problem with php 5.3 (which makes that a duplicate of #785364: Incompability with php 5.3). #14 and #15 confirm that this is fixed..