Asking
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 ;___;
This page is a permanent link to the reply below and its nested replies. See all post replies »
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
Fishy · 36-40, F
@Elessar Damn 😂

But seriously tho, I'm just trying to figure out how to add a button that takes the reader to the previous page,

like, if reader is on page 20 or page 30, and they click a hyperlink that takes them to page 5, I wanna have a button that takes them back to back 20,

I don't want to specify the link to take the reader to page 20 in case they were hyperlinked from page 30
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 · 36-40, F
@Elessar

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.