UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Export To Pdf - Links Follow Text Not Href, Any Version    
 
   
accessDatabase
post Nov 14 2019, 11:09 AM
Post#1



Posts: 63
Joined: 17-December 15



Hi all,

I'm having some trouble with a report containing hyperlinks which is exported to a pdf. Hope someone can help!

The report contains an unbound text box which during the report's load event is populated with text from a Long Text field with Rich Text format. (During the report's load event, the links within this string are programmatically altered to put some tracking information on the tail end, e.g. http://www.example.com?email=joe@bigbiz.com (taking the email address from a report field). The text in this field is originally entered via a form which automatically converts text which is similar to https://www.example.com into a hyperlink within the text field.

When the report is in preview mode, the links do not fire. They do fire when exported to a PDF using:

DoCmd.OpenReport "repName", acViewPreview, , "ID = " & Me.ID, acHidden
DoCmd.OutputTo acOutputReport, "repName", acFormatPDF, , True, , , acExportQualityPrint
DoCmd.Close acReport, "repName"

But, the link doesn't go to this new link destination, it instead goes to the link that it generates itself from the link text. It seems more to do with the PDF reader converting the text into links rather than the supplied HTML being interpreted correctly.

e.g. <a href="http://www.example.com?email=john@bizgo.com">http://www.example.com</a> goes to http://www.example.com and not http://www.example.com?email=joe@bigbiz.com

I can't figure out where the problem originates, is it with the links that are auto-created during data entry or in the report creation or the export to pdf.

Has anyone come across this before? Is it a link formatting issue?

Thanks!



Go to the top of the page
 
theDBguy
post Nov 14 2019, 12:48 PM
Post#2


UA Moderator
Posts: 76,845
Joined: 19-June 07
From: SunnySandyEggo


Hi. Just to clarify, are you saying the link on the PDF looks like it has the query string; but when you click it, the address bar doesn't include it? Is there a way you can maybe right-click on the hyperlink on the PDF and view the URL to examine it?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
accessDatabase
post Nov 15 2019, 11:08 AM
Post#3



Posts: 63
Joined: 17-December 15



Hi.

No, the link on the PDF doesn't have the query string. It's as if it is just the visible text that is coming through into the PDF and the PDF reader is 'converting' these into clickable links.

Go to the top of the page
 
theDBguy
post Nov 15 2019, 12:31 PM
Post#4


UA Moderator
Posts: 76,845
Joined: 19-June 07
From: SunnySandyEggo


Hi. Can you post a sample copy of the report? You verified the report includes the query string, right?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
accessDatabase
post Nov 27 2019, 05:44 AM
Post#5



Posts: 63
Joined: 17-December 15



Hi, sorry for the slow reply.

Here's a sample of what I'm trying to do.

The string supplied to the textbox in the report is:

CODE
<div><a href="http://www.bbc.co.UK?email=info@business.com">http://www.bbc.co.UK</a></div><div><a href="http://www.google.com?email=info@business.com">http://www.google.com</a></div>


However the links in the pdf are just http://www.bbc.co.UK and http://www.google.com

PDF file attached.Attached File  repLinkTest.pdf ( 5.75K )Number of downloads: 2


I've also noticed that if you pass a link such as <a href="google.com">Google</a> that this doesn't operate as a link at all in the pdf which makes me think that the link in the pdf is just picking up the link structure from the passed link text rather than the link supplied in the <a> tag.

Is it a formatting issue or just not possible?
This post has been edited by accessDatabase: Nov 27 2019, 05:46 AM
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    10th December 2019 - 02:17 AM