[ENG] Process of JS in PDF at Adobe

mntly·2024년 8월 30일
0
post-thumbnail

[Fig 1] The process of handling JS script embedded in PDF at Adobe Acrobat Reader DC


  • PDF can have embedded JavaScript code, and Adobe executes this.
  • The JS Engine, SpiderMonkey, executes this embedded JS Script using EScript.api in Adobe.
    • JS Engine, SpiderMonkey used by Adobe is implemented in C++.
  • If the URL is defined in the PDF, Adobe performs related to URL and Internet access using IA32.api.
  • We can send the two types of URL to Adobe with PDF.
    1. base URL

      • The base URL means the base of the URL such as https://….
      • We can send the base URL to Adobe by setting the object in the PDF.
      11 0 obj
      <<
      /Base <FEFF68747470733A2F2F7777772E61612E636F6D2F414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141412F>
      >>
      endobj

    1. relative URL

      • The relative URL means the URL comes out after the base URL.
      • We can send a relative URL to Adobe by passing the relative URL as the parameter of functions related to Internet access with JS script embedded in the PDF.
      • We can do this using the functions, this.submitForm(), app.launchURL(), etc.
      try {
        this.submitForm('relative URL');
      } catch (err) { }

Feedback is always welcome

2개의 댓글

comment-user-thumbnail
2024년 11월 26일

I can’t stand working with PDFs, although I have to deal with them often. Honestly, I need one single, super convenient app or software for PDFs because all these online editors and converters drive me crazy.

답글 달기
comment-user-thumbnail
2024년 11월 27일

Really? Problems with PDFs? I think it’s such a convenient format for working with various documents. I don’t like Word at all. Nowadays, I mainly use Google Docs, which is much more convenient for me than Word. Speaking of PDFs, here’s a useful resource https://setapp.com/how-to/split-pdf-pages. It’s not just about working with PDF pages and files, but also about tools like Nitro. Since I discovered this utility, I’ve had no issues with editing PDFs—it’s all available within a single app, saving me tons of time and effort.

답글 달기