How to Remove Script in a PDF using Web API

You might want to disable JavaScript in PDF documents for privacy and confidentiality reasons. PDF files with embedded JavaScript are more vulnerable, and one can easily steal your personal information. For the safe and secure side, you want to keep information private and disable or remove JavaScript from PDF documents. Well, Web API is the perfect tool that you can rely on to remove the embedded JavaScript from PDF documents in very simple steps. is trusted by 50,000+ users, Low-code, REST API, and 3,000+ integrations. It also provides online tools for performing essential PDF-related functionalities such as splitting/merging PDF, document parsing, filling PDF forms, HTML to PDF conversation, PDF data extraction to various formats, PDF conversion, barcode reader, and many more.

Today, we’ll show you how to remove JavaScript from PDF documents using Web API. Below, you will see a sample PDF with embedded JavaScript that we use in this tutorial. So, let’s begin!

  1. Login Account
  2. Request Tester Page
  3. Run Request Result
Sample PDF with Embedded JavaScript
Sample PDF with Embedded JavaScript

Here’s the step-by-step guide to removing the embedded JavaScript from PDF documents using Web API.

Step 1: Log in to Account

  • First, log into your account and click the Request Tester menu.

Login Account

Step 2: Request Tester Page

Here on the Request Tester page, we will add the API Endpoint and also the source PDF document with embedded JavaScript.

  • For the Choose API Endpoint field, search and select the /pdf/makeunsearchable. This method converts PDF files into “text unsearchable” pdf which is the same as if you printed and then scanned your PDF. In other words, this method converts your pdf into a “scanned” pdf file where everything is turned into an image. The embedded JavaScript in PDF documents will be removed and all private information will be safe and secure.
  • For the Input Parameters field, input it with a file or directly add the URL of your source file.
  • After adding the endpoint and source file, click the Run Request button to send a request to

Request Tester Page

Step 3: Run Request Result

  • Great! The process our request successfully and returned a temporary URL. Kindly click the resulting URL to view the output or directly download the output file.

Run Request Result

In this tutorial, you learned how to remove JavaScript from a PDF document using Web API. You also learned how to make PDF text searchable to unsearchable PDF.