Closed (fixed)
Project:
Printer, email and PDF versions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2008 at 14:37 UTC
Updated:
26 Mar 2009 at 20:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
jcnventuraHi,
I have no idea how you can avoid this, but I just wanted to let you know that the module self-configures TCPDF, so nothing you modify in the tcpdf_config.php file makes any difference.
Is this image path in the HTML printer-friendly page?
João
Comment #2
cybershan commentedYes, the image is in the HTML page.
it might be my drupal set up problem..
thanks João.
Comment #3
joostvdl commentedI have the same problem here. It has to do with private files setting. In my case I have FCKEditor to place the file. It makes the url then in the form of /system/files/.....
My error is: TCPDF ERROR: Missing or incorrect image file: /customer/www/web88/web/nl/system/files/image/Nieuwsbrief/MOUSAKA.JPG
Witch point in this case to the changed path of the file due to the private option. This problem was also the case with mime mail module.
Comment #4
joostvdl commented#314521: TCPDF problem with images in private folder
Comment #5
jcnventura@joostvdl: I see that the path includes "nl".. What is the real path?? Are you by the way using the i18n module?
I am thinking this may be a duplicate of #388396: Remove i18n path suffix from image URLs used by TCPDF.
João
Comment #6
jcnventuraComment #7
joostvdl commentedThis seems to be the problem. When I manually remove the country code from the source, the conversion to PDF works fine. The patch provided does not work because the regular expression doesn't find a correct pattern with the country code still in place. So the stripping of the country code has to be done earlier, or the pattern has to be altered so it skips the country code.
Comment #8
jcnventuraJust a question: which module is adding your country code?
As to the patch, I don't like the fact that it replaces everything (and not only the image paths going to TCPDF), so that's the reason why I haven't committed it yet. The side-effects of that approach are so many that for sure the final patch will be substantially different.
João
Comment #9
joostvdl commentedI use FCKEditor to place the images. So that adds the country code to the source.
Comment #10
joostvdl commentedAlso the function i18n_get_lang does not exist in D6 so the patch doesn't work at all....Comment #11
joostvdl commentedI have created a patch. Please check it.
Comment #12
jcnventuraI take it that this is working for you?
Confirming my previous answer in the other issue*, this patch uses a couple of variables defined by the locale module. I don't really like the whole pattern duplication that is going on in the module (makes it harder to maintain), but I think that a simple modification to your patch will maintain the same functionality while eliminating the pattern duplication. I will do that soon.
João
* which is now marked duplicate of this one, as I will be commenting on this one alone.
Comment #13
joostvdl commentedYes this patch works great for me. I'm no php developer so I think that some smart changes are doable for you ;-)
Comment #14
jcnventuraI have just committed some code to remove the country code, similar to joostvdl's patch in #11.
It should be in the dev version in a couple of hours.
João