Split PDF by barcode

Uses barcode values in PDF files to split the PDF file, you can also generate file names for the split files based on the barcode values.

Input Parameters

Required Parameters

File Name:
Data Type = string
The name of the source file, this will be used for the file name template.

File Content:
Data Type = string (byte – base 64 string)
The content of the source file, this should be converted to a base64 string if you are passing it from code, otherwise Power Automate handles this aspect.

File Name Template:
Data Type = string
Template for the output text result if a barcode match is found, any occurrence of variables in the list below will be replaced by the appropriate value at runtime.

%VALUE1%:The text extracted from the first zone that was extracted, if no zone was provided all the text in the page will be returned.

%VALUE2%, …, %VALUEn%The text extracted from the nth zone that was extracted.

No Barcode Match Template:
Data Type = string
Template for the text to be returned if a barcode match is not found

Optional Parameters

Pages with no Match:
Data Type = string
Choose the location of the page with the barcode in the output files from the split operation.

Do not copy to output: If this option is selected, the pages without matches will not appear in the output.

Copy to output: If this option is selected, this action will also output the unmatched pages with the original file name

Copy to output and rename: If this option is selected, this action will also output the unmatched pages with the ‘No Text Match Template’ name

Output File Options:
Data Type = string
Depending on the split option you choose, some pages will have no barcode value extracted. Choose what to do with these pages.

  • Barcode on first page: The barcode page will be the first page in the split section output.
  • Barcode on last page: The barcode page will be the last page in the split section output.
  • Remove barcode page: The barcode page will not appear in the split section output.


Barcode Zones:
Data Type = Object []
A collection of variables that can be used to extract barcode information from PDF files, each member of this collection contains the properties listed below. Each member of this collection should produce a text output that corresponds to %VALUEn% of the Barcode Result Template discussed above.

Barcode Location:
Data Type = string
This represents the coordinates of a rectangle that covers the barcode you want us to extract. You can use this page to get the coordinates in relation to your input files.

Barcode Pattern:
Data Type = string
If a regular expression is provided here, we will match any extracted barcode to it and return the match.

Barcode Type:
Data Type = string[]
Specify the types of Barcode you want to identify

				
					"All 1D", "AZTEC", "CODABAR", "CODE 128", "CODE 39","CODE 93", "DATA MATRIX", "EAN 13", "EAN 8", "ITF","MAXICODE", "MSI", "PDF 417", "PLESSEY", "QR CODE","RSS 14", "RSS EXPANDED", "UPC A", "UPC E", "UPC EAN EXTENSION"
				
			

Output Parameters

Split Output Files:
Data Type = object[]
Array of Split Files with their corresponding file names.

File Content:
Data Type = string (byte – base 64 string)
A base 64 string representation of the spilt file.

File Name:
Data Type = string
File name for the split file above

Page Range:
Data Type = string
The page range containing the page numbers of the split operation

Is Successful:
Data Type = boolean
A boolean value specifying if the operation was successful or not.

License Info:
Data Type = string
Information about your API subscription key, it contains:

LicenseType
CallsRemaining
CallsMade
RenewalDate

Error:
Data Type = string
Contains the Error message returned by the operation if any exist.