Full Version: Make Links In Pdf Report Clickable
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
lexicon
I have converted a number of fields in a database to be Rich Text, so users can format text and enter links to other documents. This is all working fine, including the links, which are clickable and open the document to which they refer. Once users have completed their data entry, they may call a report and choose to save the report in PDF format. When they do this, the PDF is created fine, with all the Rich Text formatting intact. However, any links - whether absolute or relative - to other documents are not clickable in the PDF document. I don't know if this is a limitation of Adobe Reader, which is the only PDF software the users have, or whether this is due to the way the PDF documents were created (IE: via an Access database.) Any light you could shed on this would be appreciated.
Thnx
Lex
lexicon
I've tried using Nitro PDF. Same issue.
theDBguy
Hi Lex,

Just a thought but have you tried adding some regular hyperlinks like http://www.UtterAccess.com just to see if it makes a difference in the PDF?

My guess is that maybe links to documents are being treated differently.

Just my 2 cents... 2cents.gif
lexicon
Good idea, and in fact, the HTTP hyperlink does work, albeit with a warning message. So your suggestion might be correct in that the links to documents are being treated differently. Here are some samples of how the links appear in the database forms and reports, and the PDF generated from the database...

http://www.UtterAccess.com (IS CLICKABLE)
<file:\\C:\Users\Alex\Desktop\richtext.txt> (IS NOT CLICKABLE)
file:roi_changes.txt (IS NOT CLICKABLE)

The question now is what has to be done to make those document links clickable?

lexicon
I've tried a number of different output formats (PDF, XPS, HTML, Word, etc), but while the HTTP links are functional in some output formats, the absolute and relative document links are never functional. I've even tried installing the old Snapshot Viewer from previous editions of Access, but it too delivers non-clickable document links in its .snp file. I've also tried different readers, and different "printers" (IE: Win2PDF) to no avail. A poster elsewhere suggested I would need to do some "custom PS programming", but I have no idea what he's talking about, and he hasn't elaborated. All I've been able to suggest to my client is that she copy the document link to the Start Button > Search box, and then click on the document in the search results. That works, but surely there must be a better solution than that.

Are there any geniuses out there who can solve this?
mandrews
I thought that the win2pdf printer driver would take any text that looked like a hyperlink and make it an actual hyperlink?

Might have to be http://www.rptsoftware.com
instead of www.rptsoftware.com
for example.

Other than that I think using hyperlink fields with the default pdf exporting is the option.

perhaps a different pdf driver could be configured, I know some of them have some advanced stuff.

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
mandrews
I did a quick example of a report with a text field that is RTF (in report also selected RTF format).

When exporting using built-in pdf option the links show as underlined but NOT clickable
when printing to win2pdf they are ACTUAL CLICKABLE hyperlinks.

I attached the two files

Note: this was just a quick example where I took an existing report and quickly threw the Notes field on the report.

HTH,
Mark
RPT Software
http://www.rptsoftware.com
http://www.microsoftaccesstemplate.com
mandrews
Sorry I think I read your post too fast. for File:// links in RTF text fields in access not sure. I tried file://c:\aaa\ann.pdf and it did make the link clickable but prompted to allow or block hyperlink of this type and when I choose allow it did not work.
Might need to look at it more.
Mark
lexicon
mandrews,
Thanks for trying. I've experienced the same as you. Regular web links are clickable in the PDF document. However, document links are not. I still don't know how to overcome this. It's been driving me crazy. I'm starting to think it's not possible.
Lex
theDBguy
Hi Lex,

Out of curiosity, I just created a test db using 2010 with a hyperlink field in a table. I added a hyperlink to a local text file, then created a report based on that table.

In the Immediate Window, I executed an OutputTo command using the acFormatPDF format and when I opened the resulting PDF file, the hyperlink worked.

Is that basically what you're doing?

Just my 2 cents... 2cents.gif
lexicon
I have figured out a way to make the absolute document links clickable in a PDF.

If you change the way the document links are entered in the database form by ...
a. Dropping the chevrons ("<", ">") at the beginning and the end of the link, and...
b. Make all the slashes in the path be forward slashes ("/") instead of backward ("\") slashes, or a combination of forward and backward, then...
the link will still work (be clickable) in the database form, and it will also work (be clickable) in a PDF report.

IE: file://c:/users/alex/desktop/sample.pdf

I've tried this with both the built-in Access PDF printer, and with a standalone PDF printer (Win2PDF), and it works with the PDF that is generated with either printer. When you click on the link in the PDF, you will get a prompt asking whether you want to allow the destination document to open, and when you click "Allow", the document opens.

No luck with relative document links though. That is the next challenge. Anyone?
lexicon
theDBguy,
I am not using hyperlink fields. I am using Rich Text fields. The user enters a link (could be any type of link - HTTP, file, mailto, etc) in the form, and the users want the link to be clickable in both the form and any PDF reports generated by the database.
I am not having any difficulty with HTTP links. And I now have a solution for absolute file links. The issue now is relative file links, which I still can not make clickable in a PDF.
Thanks,
Lex
JonSmith
If hyperlink fields work then can you not change from rich text to that? Are you tied to Rich text for any other reason?
theDBguy
Hi Lex,

QUOTE (lexicon @ Apr 26 2012, 11:17 AM) *
theDBguy,
I am not using hyperlink fields. I am using Rich Text fields. The user enters a link (could be any type of link - HTTP, file, mailto, etc) in the form, and the users want the link to be clickable in both the form and any PDF reports generated by the database.
I am not having any difficulty with HTTP links. And I now have a solution for absolute file links. The issue now is relative file links, which I still can not make clickable in a PDF.
Thanks,
Lex

A Hyperlink field can take all those protocols too, and it could hide the "absolute" address while only showing the "relative" links. Otherwise, if you're letting your users type in the link, I'm not sure what would be the syntax for "relative" addresses.

Just my 2 cents... 2cents.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.