Welcome Guest Search | Active Topics | Sign In | Register

Cannot get a hyperlink to work. Options
Lasertec
Posted: Tuesday, April 12, 2011 1:09:21 PM
Rank: Newbie
Groups: Member

Joined: 4/8/2011
Posts: 4
Here is some very basic code. It does not recognize TargetUrl. Any reasons this might be?



Sub eoPDF()
Dim doc As PdfDocument = New PdfDocument
Dim render As AcmRender = New AcmRender(doc)
Dim text As AcmText = New AcmText("Account Number: " + Session("AcctNum"))
Dim link As New AcmLink(New AcmText("https://******************aspx"))
Dim pName As String = Session("Date") + ".pdf"
Dim serverpath As String

'Dim sUrl As String = "~/temp/" & pName
link.TargetUri = "https://****************************.aspx"
'Render the text object to the PDF
render.Render(text)
render.Render(link)
'Create the root content
'Dim root As New AcmContent()
'Create a link for text "Link Sample"
'Save the PDF file
'***************************************
' Local Testing
'doc.Save(pName)
serverpath = (Server.MapPath("./temp/"))
doc.Save(serverpath + pName)
'doc.Save("~/temp/" & pName)
Response.Redirect("temp/" & pName)
End Sub


Thanks!

Lasertec
Posted: Tuesday, April 12, 2011 1:16:27 PM
Rank: Newbie
Groups: Member

Joined: 4/8/2011
Posts: 4
It builds and shows up the text and link, but when I click, it gives me an error. 'c'
eo_support
Posted: Tuesday, April 12, 2011 1:18:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Your code is correct. This appears to be a bug in an early build, so you may want to check with the latest build. We tested your code on the latest build (DLL version 3.0.24.2) and it worked correctly. You can download the latest build from our download page.

Please let us know if the problem continues.

Thanks!
Lasertec
Posted: Tuesday, April 12, 2011 1:24:35 PM
Rank: Newbie
Groups: Member

Joined: 4/8/2011
Posts: 4
Thanks!
Lasertec
Posted: Tuesday, April 12, 2011 1:48:26 PM
Rank: Newbie
Groups: Member

Joined: 4/8/2011
Posts: 4
Worked Great... thanks!
eo_support
Posted: Tuesday, April 12, 2011 1:51:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Glad to hear that. Thank you very much for confirming that it works!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.