Foxit PDF Editor for Windows

User Guide

  • Introduction
  • Get Started
  • Read
  • Create
  • Edit
  • Organize
  • Comment
  • Share PDFs
  • Forms
    • Interactive Form and Non-interactive form
    • Fill in PDF Forms
    • Comment on Forms
    • Manage Form Data
    • Form Fields
    • JavaScript
      • About JavaScript
      • Document JavaScript
      • Document Action
      • JavaScript Console
      • JavaScript Editor
      • Optional Database connectivity to Windows ODBC
  • Security
  • Signature
  • Accessibility
  • Foxit Admin Console
  • Print
  • Foxit AI Assistant (Available in Subscription Releases and Certain Regions)
  • Appendices

About JavaScript

JavaScript is a dynamic, prototype-based language with first-class functions, which serves as a means to easily create interactive web pages. In Foxit PDF Editor, you can easily integrate this level of interactivity into your PDF documents. 

With Foxit PDF Editor, you can invoke JavaScript code using actions associated with documents, bookmarks, links, and pages. Foxit PDF Editor provides four options –Document JavaScript, Document Action, JavaScript Console, and Edit All JavaScripts. The Document JavaScript lets you create or access document level scripts in Foxit PDF Editor. The Document Action lets you create document-level JavaScript actions that apply to the entire document. The JavaScript Console provides an interactive and convenient interface for testing portions of JavaScript code and experimenting with object properties and methods. The Edit All JavaScripts option allows you to create and edit all JavaScripts (e.g. bookmark JavaScripts, page JavaScripts, etc.) in the JavaScript Editor.

(Tip: You can modify JavaScript code using other JavaScript editors you are familiar with such as WebStorm and Sublime Text. To do this, you need to add the JavaScript editor first in File > Preferences > JavaScript. See also Use external JavaScript editor.)