API V2

Replace Text with Image

Replace text in the PDF file with an image.

  • Method: POST
  • Endpoint: /api/v2/ReplaceTextWithImage

Parameters

File Contentbase64, Required

Input file content from the source

File Namestring, Required

Input file name from the source

Replace TextString, Required

Replace text will be display, the replace text must be in string format.
Example - enter_input_text

Image Contentbase64, Required

Content of the input file

Image Widthinteger, Required

Image width will be display, the image width must be in number format.
Example - 10

Image Heightinteger, Required

Image height will be display, the image height must be in number format.
Example - 10

Page SequenceString, Required
  • Specify page indices as comma-separated values or ranges to process (e.g. “0, 1, 2-” or “1, 2, 3-7”).
  • If not specified, the default configuration processes all pages. The input must be in string format.

Output

Textarray of string, Required

Text will be display in array format.

Imagesarray of object, Required

Images will be display in array format.

File Namestring

Output file name

File Contentbyte

Output file content

Header
Content-Type:application/json
Authorization: Please copy key from the link.

Payload

{
  "docContent": "Please put PDF base64 content",
  "docName": "output.pdf",
  "replaceText": "enter_input_text",
  "pageSequence": "all",
  "imageContent": "Please put image base64 content",
  "imageHeight": 10,
  "imageWidth": 10
}

PDF4me api samples

CSharp(C#)
Java
JavaScript
Python
Salesforce
n8n
Google Script
AWS Lambda