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!

CommentFileSizeAuthor
#2 printer_friendly.html_.txt9.8 KBlisawoodsca

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

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

lisawoodsca’s picture

StatusFileSize
new9.8 KB

Hi 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.

jcnventura’s picture

Hi,

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

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Fixed

Hi,

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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.