Search And Replace Or Delete Text Pn

Input

NameDescriptionRequired
PDF URLProvide the URL to the source PDF document, or a filetoken:// link from PDF.co Built-In Files Storage. If you use another cloud service such as Google Drive or Dropbox ensure the link is publicly accessible.Yes
Operation TypeChoose whether you want to search for text and replace it with other text or an image, or simply search and delete the matched text.Yes
Search TextSpecify the text you wish to search for within the PDF document (e.g. company name).Yes
Replacement TextEnter the new text that will replace the found text.Yes
Replacement Image URLProvide the URL of the image to be used as a replacement for the located text.Yes
PagesSpecify page indices as comma-separated values or ranges to process (e.g. “0, 1, 2-” or “1, 2, 3-7”). The first-page index is 0. Use ”!” before a number for inverted page numbers (e.g. “!0” for the last page). If not specified, the default configuration processes all pages. The input must be in string format.No
Replacement LimitLimit the number of searches & replacements for every item. The value 0 means every found occurrence will be replaced.No
Use Regular ExpressionsSet to true to use regular expression for search string(s).No
Case SensitiveSet to false to don’t use case-sensitive search.No
File NameFile name for the generated output, the input must be in string format.No
Webhook URLThe callback URL or Webhook used to receive the output data.No
Output Links Expiration (In Minutes)Set the expiration time for the output link in minutes. After this specified duration, any generated output file(s) will be automatically deleted from PDF.co Temporary Files Storage. The maximum duration for link expiration varies based on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf templates, documents) consider using PDF.co Built-In Files Storage.No
PasswordThe password of the password-protected PDF fileNo
HTTP UsernameHTTP auth user name if required to access source URL.No
HTTP PasswordHTTP auth password if required to access source URL.No
Custom ProfilesUse JSON to customize PDF processing with options like output resolution, OCR settings, text extraction methods, encryption, and image handling. Check our Custom Profiles section to see all available parameters for your current endpoint.No

Custom Profiles

You can set additional options for the operation used in the PDF.co node by using Custom Profiles. A custom profile is a string in JSON-like format containing predefined parameters. Here’s an example of a Custom Profiles input:
{'YAdjustmentForReplacementText': '-1'}
With this input, the PDF.co operation will adjust the vertical position of the replaced text, ensuring proper alignment with the rest of the document. Negative values for this parameter move text up, positive values move text down. You can find the list of available parameters for customizing profiles in the PDF.co operation documentation below:
ParameterTypeDefaultDescription
AutoCropImagesbooleanfalseIf you require to crop empty space around an inserted image use the following: profiles": { 'AutoCropImages': true }
outputDataFormatstring-If you require your output as base64 format, set this to base64
DataEncryptionAlgorithmstring-Controls the encryption algorithm used for data encryption. See User-Controlled Encryption for more information. The available algorithms are: AES128AES192AES256.
DataEncryptionKeystring-Controls the encryption key used for data encryption. See User-Controlled Encryption for more information.
DataEncryptionIVstring-Controls the encryption IV used for data encryption. See User-Controlled Encryption for more information.
DataDecryptionAlgorithmstring-Controls the decryption algorithm used for data decryption. See User-Controlled Encryption for more information. The available algorithms are: AES128AES192AES256.
DataDecryptionKeystring-Controls the decryption key used for data decryption. See User-Controlled Encryption for more information.
DataDecryptionIVstring-Controls the decryption IV used for data decryption. See User-Controlled Encryption for more information.
YAdjustmentForReplacementTextinteger-Adjust the vertical position of the replaced text, ensuring proper alignment with the rest of the document. See Adjust Text Alignment for more details.

Output

NameDescription
jobIdUnique identifier for the background job.
pageCountNumber of pages in the PDF document.
errorIndicates whether an error occurred (false means success)
statusStatus code of the request (200, 404, 500, etc.). For more information, see Response Codes.
creditsNumber of credits consumed by the request
remainingCreditsNumber of credits remaining in the account
durationTime taken for the operation in milliseconds
urlDirect URL to the final PDF file stored in S3.
nameName of the output file
outputLinkValidTillTimestamp indicating when the output link will expire