Closed (duplicate)
Project:
Printer, email and PDF versions
Version:
6.x-1.17
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
25 May 2012 at 05:42 UTC
Updated:
11 Jul 2015 at 02:47 UTC
Jump to comment: Most recent
Comments
Comment #1
jcnventuraThere shouldn't be any difference between the two, except if your logo path starts with '//'. In that case, because of the fix to #1542056: Image not found when using img src=//www.something.com/image.jpg, your current protocol would be prepended to the logo URL.
Is this your case?
Comment #2
Anonymous (not verified) commentedI've tried to use a user logo (path /sites/default/files/print_logo.png)
I also tried to use the default theme's logo
The issue still persists.
Comment #3
jcnventuraDoes it work if you replace the print.pages.inc file with the one from 6.x-1.16?
Comment #4
Anonymous (not verified) commentedreplacing print.pages.inc from 6.x-1.16 to 6.x-1.17 solves the issue
Comment #5
jcnventuraOK, that helps to narrow it down to one possible explanation: somewhere in your page, there's an image that just during the PDF pre-process has a path/URL that starts with "//".. As pointed out in another issue, to complete a URL that starts with a double-slash, it's necessary to add the protocol schema.
Did you select the no logo option when you tested the different possibilities? I'd like to make sure the logo isn't being included somewhere else.
Comment #6
Anonymous (not verified) commentedthis are the cases:
no logo: it produces the pdf with text and images
theme logo: TCPDF ERROR: [Image] Unable to get image
custom logo: TCPDF ERROR: [Image] Unable to get image
Comment #7
jcnventuraOK. Thanks a lot for your help.
I've got all I needed to know.. Still can't reproduce it though.
Comment #8
jcnventuraOne final question: what's the version of TCPDF that you've got installed?
Comment #9
Anonymous (not verified) commentedtcpdf_5_9_162, but I also tried with tcpdf_5_9_160
Comment #10
foutrelis commentedIt looks like theme_image (called from print.pages.inc:237) is changing the URL from '/sites/default/files/site_logo.png' to '//sites/default/files/site_logo.png' (note the added forward slash at the beginning).
This is not related to PDF generation, as the double slash in the logo appears in the normal "print" page as well.
I'm guessing this is the offending change:
http://drupalcode.org/project/print.git/commitdiff/2ead48b70754c30be9c1f...
Comment #11
jcnventuraIndeed it is, and another user (Nor4a) provided a patch for it in #1626878: Logo not showing up in the print pages after upgrade to 6.x-1.17.
Marking this as a duplicate of that one, as his patch fixed this issue as well.
Comment #11.0
jcnventura.
Comment #12
omar alahmedmake sure that this folder is writable: default\files\print_pdf\tcpdf\cache
when my folder became writable, the problem is solved.
the source: http://stackoverflow.com/questions/7665540/tcpdf-error-image-unable-to-g...