Insert PDF Content
  • 22 Aug 2023
  • 1 Minute to read
  • PDF

Insert PDF Content

  • PDF

Article summary

InsertPdfDocument

Inserts the content of a PDF document (generated or provided) into a source PDF document. Additional settings allow for the correct positioning of the inserted content and managing page number continuity, or its formatting. 


   Exceptions are thrown for configuration settings that fail validation, or any other error condition.

    

     

Configuration:

ParameterData TypeDescription

MergeContent [Required]

Byte[]

The PDF content to insert into SourceDocument.

Page

Integer

Sets the page number to begin inserting MergeContent.

Placeholder

String

String placeholder in the PDF where content insertion should take place. 

ProcessingMode

String

Two options are available:

  1. Placeholder: Inserts content at the position of the placeholder.
  2. Page: Inserts content at the specified page number. 

UsePlaceholderPositionX

Boolean

Sets whether to use the X position in points of the specified Placeholder when inserting MergeContent.

UsePlaceholderPositionYBooleanSets whether to use the Y position in points of the specified Placeholder when inserting MergeContent.
XOffsetIntegerSet an X offset in points for MergeContent being inserted.
YOffsetIntegerSet an Y offset in points for MergeContent being inserted.
FillColorStringSets the fill color in hexadecimal for the background of MergeContent.
FillPositionHeightIntegerSets the height of the fill area in points. 
FillPositionWidthIntegerSets the width of the fill area in points.
FillPositionXIntegerSets the X position in points of the fill-area.
FillPositionYIntegerSets the Y position in points of the fill-area
ShouldDrawRectangleAreaBooleanSets whether to draw the fill-area over old page numbers on every page.


    Fill-area blocking is useful to avoid scanning for page number patterns on each page.

   
DisplayNameStringDisplay name of the workflow activity.
Result [Out]Byte[]The resulting PDF document after MergeContent has been inserted into SourceDocument.
PageNumberFixedPositionXIntegerSets the X position of page numbering in points.
PageNumberFixedPositionXOffsetIntegerSets the offset of the X position of page numbering in points.
PageNumberFixedPositionYIntegerSets the Y position of page numbering in points.
PageNumberFixedPositionYOffsetIntegerSets the offset of the Y position of page numbering in points.
PageNumberFontSizeIntegerSpecifies the font size of page numbering text.
PageNumberFormatStringDefines the format of page number text using the tokens {PageNumber} and {TotalPages}.
 

    E.g.: 
"Page {PageNumber} of {TotalPages}" translates to "Page 1 of 10" where the current page number =1 and the total pages in the document = 10.
   
PageNumberTextPositionStringSets the position of the page number text. Three options are available:
  1. InferFromPreviousPagesFixedFallback
  2. InferFromFirstPagesFixedFallback
  3. Fixed 
ShouldInsertPageNumbersBooleanSet the inclusion of page numbers or not.
ShouldPerformRedactionOnPageNumberPatternBooleanSpecifies whether to clear the previous page numbering text based on the configured page text format. 
SourceDocument [Required]Byte[]The source PDF document to insert MergeContent into where Placeholder or PageNumber occurs.

   


Was this article helpful?