0

I know this may like a strange request but I'm trying to build a pdf with dynamic URL link, and though I suspect it's not possible thought its worth a try

What I need is a pdf with a link to a website, but the link needs a query added to it which needs to be either the pdf file name or value of a text field within the pdf

Any help would be much appreciated

Thank you

David wyatt
  • 308
  • 1
  • 10
  • PDF's just don't do this. You haven't explained what you're doing or what drives the dynamic nature of this, but I suggest you add a static link to a web app that can do what you need. – Nick.Mc May 16 '21 at 11:12
  • I wanted a way to track when someone had finished reading the pdf, a simple 'click here' that read their name and passed through http to be added to database felt like user friendly approach. Like i said I knew it was long shot but guess next time best not to reach out and ask – David wyatt May 16 '21 at 11:20
  • You can create a static link to a web app that tries to guess their username and does that. It can be tricky to get the username though – Nick.Mc May 16 '21 at 11:24
  • Do you have any idea how PDF would read a username? I found this including a link to identifying a user, but I guess this would all be disabled by now. https://stackoverflow.com/questions/9219807/documentation-for-using-javascript-code-inside-a-pdf-file – Nick.Mc May 16 '21 at 11:28
  • I was thinking of using file name, as we can set that when we send it them or adding form text box that they could fill in. Thank you, the link looks interesting and worth investigating (never thought of trying to embed js) – David wyatt May 16 '21 at 11:31
  • Well if you can set the filename then you can also set a static link inside the PDF, and call a web site with a parameter, and that web site can write to a database. That will actually work as long as the website isn't blocked from the person. They don't even need to press anything on the website – Nick.Mc May 16 '21 at 11:35
  • As there is going to be 100s of users how could I do the static link in bulk (I was going to use VBA to bulk rename the files) – David wyatt May 16 '21 at 11:37
  • If you're going to do the filename in bulk, the static link is no more complicated – Nick.Mc May 16 '21 at 11:38
  • .. assuming you actually have PDF generation software that can change a link. – Nick.Mc May 16 '21 at 11:39
  • 1
    You won't be able to control the PDF behavior unless you control the PDF viewer. Adobe Embed API allows you to post a PDF file and use a JavaScript viewer to display it making the experience consistent across all surfaces. The viewer also has callbacks that allow you to detect when they have scrolled (read) to the last page and then send some information to your server. It also has the concept of a "user" that you can either set or have the user enter. – joelgeraci May 17 '21 at 20:02

0 Answers0