Stirling PDF icon

Stirling PDF

Merged API: Stirling PDF - Processing API + Stirling PDF - Management API + Stirling PDF - System API

Actions260

Misc → Replace And Invert Color

AI-generated

Summary

Transform a PDF's colors by applying specified replace and invert options, optionally processing input from a binary file or referencing a server-side file ID.

Inputs

  • Input Binary Field Name (File Input) — Name of the binary property containing the PDF file data to process. Defaults to 'data' if not specified.
  • File Id — Identifier for a server-side PDF file to process, used instead of binary input for async-prepared files.
  • Replace And Invert Option (required) — Specifies the color transformation to apply to the PDF. Options include HIGH_CONTRAST_COLOR, CUSTOM_COLOR, FULL_INVERSION, and COLOR_SPACE_CONVERSION.
  • High Contrast Color Combination (required) — When using HIGH_CONTRAST_COLOR option, selects the default text and background color combination such as WHITE_TEXT_ON_BLACK or BLACK_TEXT_ON_WHITE.
  • Back Ground Color — If CUSTOM_COLOR option is selected, defines the background color as a 24-bit decimal color value.
  • Text Color — If CUSTOM_COLOR option is selected, defines the text color as a 24-bit decimal color value.

Output shape

a processed PDF file with inverted or replaced colors, returned in the node's output binary data

Requires either an input binary file (specified by Input Binary Field Name) or a File Id referencing a server-stored PDF. Processing respects the selected replace and invert option and related color parameters. Output replaces or modifies the input PDF color accordingly.

Examples

Example 1: Invert the colors of a PDF file loaded as binary data to improve readability in dark mode.

Set Input Binary Field Name to the incoming binary property name, choose FULL_INVERSION as Replace And Invert Option. Skip custom color fields.

Example 2: Convert a PDF's colors to a high contrast white text on black background using a server-side stored PDF file.

Provide the File Id, select HIGH_CONTRAST_COLOR and choose WHITE_TEXT_ON_BLACK for the High Contrast Color Combination.

Example 3: Apply custom text and background colors to a PDF for branding purposes.

Set Replace And Invert Option to CUSTOM_COLOR, specify Back Ground Color and Text Color as 24-bit decimal values, provide PDF input via binary or File Id.

Links

Discussion