APIActive

PDF Search and Delete Text API

PDF.co REST endpoint that deletes text from a PDF by search string or regex.

Open source page

Field note

What it does

POST /v1/pdf/edit/delete-text deletes text from a PDF document using search strings, with optional regex, redaction patches, and async jobs.

Capabilities

Available capabilities

Tags

Tags

Ways to use it

Ways to use it

rest

Not filed / https://developer.pdf.co/api/pdf-search-text-and-delete

rest

Not filed / https://developer.pdf.co/api/pdf-search-text-and-delete

rest

Not filed / https://developer.pdf.co/api/pdf-search-text-and-delete

Product features

Product features

​ Attributes

Base64 output

Set outputDataFormat to base64 to receive output in base64 format.

​ Code Samples

​ Example Payload

​ Example Response

​ Line Grouping Options

Make unsearchable

MakeUnsearchable replaces all pages with images so output PDF is not searchable.

​ OCRImagePreprocessingFilters

Password-protected PDFs

Password attribute allows processing password-protected PDF files.

Patch color

UsePatch and PatchColor control blacking out deleted text.

PDF to XML

​ POST /v1/pdf/convert/to/xml

​ Query parameters

Redaction areas

redactions array defines rectangular areas by page, x, y, width and height.

Redaction patches

usepatch and patchColor black out deleted text; removeTextUnderPatch controls text removal.

Regex search

Set regex to true to use regular expressions in search strings.

​ Responses

Search strings

Array of strings to search and delete in the PDF.

Unsearchable output

MakeUnsearchable replaces all pages with images in the output PDF.