|
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!
|
|
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'
|
|
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!
|
|
Rank: Newbie Groups: Member
Joined: 4/8/2011 Posts: 4
|
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/8/2011 Posts: 4
|
Worked Great... thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Glad to hear that. Thank you very much for confirming that it works!
|
|