Remove JavaScript from PDF (Step 4)

JavaScript can cause Cross-Site Scripting attacks. Removing JavaScript from a PDF can be done in several ways, depending on what software you have available. The most reliable methods are to use a dedicated PDF editor like Adobe Acrobat Pro or a simple "print to PDF" function.

Option 1: Use a PDF Editor like Adobe Acrobat Pro:

  1. Open the PDF file in Adobe Acrobat Pro.
  2. Go to File > Save as Other > Optimized PDF.
  3. Click OK to pop up message about the attached file.
  4. In the PDF Optimizer window, click on Discard Objects in the left sidebar.
  5. In the right pane, make sure the checkbox for Discard all JavaScript Actions is checked.
  6. Click OK and save.

Option 2: Flatten PDF