Have a problem with the PDF versions of my content. If the content contains any links e.g. to taxonomy tags, footer links or other pages on the site - the links in the PDF version points to file:// instead of http://mysitename/. So none of my links work in the PDFs. They display correctly in the 'send to email' and 'printer-friendly' versions just not the PDF version.
Couldn't find any report of the issue so don't know if this has been fixed already.
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | printer_friendly.html_.txt | 9.8 KB | lisawoodsca |
Comments
Comment #1
jcnventuraHi,
The replacement of URLs to file URLs happens only if the following are all true:
1. You're generating a PDF.
2. Drupal's file system settings is set to private.
3. The tag is an img tag.
I can't understand how (3) is failing for you. Can you attach the contents of the 'printer-friendly version' HTML source code?
Thanks,
João
Comment #2
lisawoodsca commentedHi there,
Thanks so much for getting back to me.
Yes I'm generating a PDF from the content on the page. The download method in admin/settings/file-system is actually set to Public. Not sure what tag you're talking about. The link is just a simple text link, no images involved.
I've attached the HTML. At the end of the page - just above 'Source URL' there is a link to mycompany News that's working in this printer-friendly version but when I want it in PDF the link points to file://
Thanks again for you help. Let me know if you need anything.
Comment #3
jcnventuraHi,
I took a look at it, it has nothing to do with the replacement I was talking about in #1. It's actually a 'bug' in TCPDF which seems to be unable to handle relative URLs. This is easily fixable in my side of things, so in a couple of days I should have it.
João
Comment #4
jcnventuraHi,
I have just committed some code that converts all the URLs in a PDF to absolute, which should fix your problem. It will be in tomorrow's dev version.
João