Extract plain text content from your PDF documents – ideal for indexing, searching, or further processing.
const { PDFTOTEXT } = require('./utils'); 
const pdfInput = input.file || input.url;
return PDFTOTEXT(pdfInput);
Make sure that the response type is set to text.
This example shows how to extract text from a PDF using a provided URL.
curl -X POST https://e.customjs.io/zeXXXy \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY_HERE" \
  -d '{
    "url": "https://css4.pub/2017/newsletter/drylab.pdf"
  }' --output test-by-url.txt
This example shows how to extract text from a PDF by sending a Base64-encoded binary string. Keep in mind that the payload size is limited to 6 MB.
curl -X POST https://e.customjs.io/zeXXXy \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY_HERE" \
  -d '{
    "file": "JVBERi0x..........EyNzg3CiUlRU9GCg=="
  }' --output test-by-string.txt