Only logged in members can reply and interact with the post.
Join SimilarWorlds for FREE »

Does anyone here know anything about using JavaScript with PDF documents?

I need help programming a button in a PDF I'm making ;___;
Northwest · M
If you're not a programmer, you're not going to really figure out how to do it programatically.

You should use the Adobe Acrobat Tools › Edit PDF › Link › Add or Edit to crate a hyperlink, that will take the reader to the page you want them to go to.
Elessar · 26-30, M
As a general rule, I avoid JS just like I'd avoid getting warts where the sun doesn't cast its light
Elessar · 26-30, M
@Fishy I had no idea that PDF files could be scripted even. Wouldn't it be easier to add a link to an anchor (or whatever is the PDF equivalent) in the page you want to link to? Above all, if you go the scripting way, are you sure every reader supports parsing/expecting arbitrary JS?
Fishy · 31-35, F

From what I understand, an anchor is a specific part in the document,
for the design I'm setting up, I really need a "go back" option 😅

Yeah, I'm learning that PDFs can do all sorts of stuff (depending on what software you use to create or edit the PDF)

But I know close to nothing about programming lol
Northwest · M
@Elessar If you understand the binary file format, you can do some creative stuff with PDF files. I have a couple of guys on my team, whose job is to stay up to speed on changes, so we can produce PDFs that can be manipulated, signed, etc.
Nanori · 31-35, F
Rokasu might know
basilfawlty89 · 31-35, M
Not with PDF no.
I understand and use JavaScript for web and app development, but never used it to make a PDF clickable.
Fishy · 31-35, F

Would JavaScript commands work the same in PDFs tho?
basilfawlty89 · 31-35, M
@Fishy should work with event listeners and functions, it is JavaScript after all.

Maybe this helps?
Fishy · 31-35, F
@basilfawlty89 Thanks, I'll check it out c:
This comment is hidden. Show Comment

Post Comment
9 people following
JavaScript, TypeScript, React, Node.js, npm, Angular, Vue, jQuery
New Post
Associated Groups Forum Members