Add Text Image To Pdf 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
TextEnter the text for the text object. Macros like line breaks (\\n or {{$$newLine}}) or page numbers ({{$$PageNumber}}) can be inserted.Yes
Image URLURL to image, base64 encoded image, or filetoken:// link to image stored in PDF.co Files storage.Yes
X CoordinateDetermine the X coordinate for text placement. Use PDF.co PDF Inspector to find or measure PDF coordinates.Yes
Y CoordinateSpecify the Y coordinate. Use PDF.co PDF Inspector to find or measure PDF coordinates.Yes
Font SizeSet the font size, with the default being 12.No
Font ColorChoose the text color in hex format (#RRGGBB or #AARRGGBB, with AA as transparency). The default is #000000.No
Font BoldEnable this to apply bold styling to the font.No
Font ItalicEnable this to apply italic styling to the font.No
Font StrikeoutEnable this to apply strikeout styling to the font.No
Font UnderlineEnable this to apply underline styling to the font.No
Font NameSelect the font name from the available font list. The default font is Arial.No
PagesIndicate specific page numbers or ranges where the text should be added. Leave blank to include all pages. The first page is numbered 0. Example: 0,2-5,7-.No
LinkAdd an optional clickable link (starting with http://https://mailto:name@example.com, etc.).No
WidthDefine the width of the text box. Coordinates start at the top left (use the PDF.co PDF Inspector to measure coordinates).No
HeightDefine the height of the text box. Coordinates start at the top left (use the PDF.co PDF Inspector to measure coordinates).No
AlignmentSet text alignment as CenterRight, or Left. Default is Center.No
TransparentSet the text background as transparent.No
Keep Aspect RatioKeep the aspect ratio of the image.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
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 Profile 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:
{ "outputDataFormat": "base64" }
With this input, the PDF.co operation will return the output in base64 format. You can find the list of available parameters for customizing profiles in the PDF.co operation documentation below:
ParameterTypeDefaultDescription
outputDataFormatstring-If you require your output as base64 format, set this to base64
Pages[0].SetCropBox()array[string]-Crop a PDF file using an array to define the crop area. The crop box is defined by a rectangle [x, y, width, height] in PDF points (1 Point = 1/72 inches).
DisableLigaturesbooleanfalseTo disable ligaturization, for example for Hebrew.
FlattenDocument()booleanfalseFlattening a document renders it as read-only. Handy if you want to remove editing or copying capability.
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.
You can also use Custom Profiles to:

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