Search
Close this search box.

Get barcode value

Extracts barcode from a PDF files in a smart way, the extracted information can be used to rename the file in Power Automate, it can also be used as an input to other processes. Properties like the location of the barcode on the page, the barcode format and regular expressions can be used to fine tune the result.

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.

Barcode Result Template:
Data Type = string
Template for the output text result if a barcode 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 Template:
Data Type = string
Template for the output text result if no barcode is found

Optional Parameters

Pages:
Data Type = string
Provide a page range you want to extract barcode values from, this can be a single page number (1), multiple page numbers separated by commas (1,2,3), a page range (1-4) or a mixture of all (1,2,4-7).

Page Separator:
Data Type = string
Provide a page separator so that you can know where the page breaks are.

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.

Page (Deprecated):
Data Type = integer
This property is deprecated, we advise you to use the Pages property. The Pages property applies to all zones and allows you select the pages you want to process.

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

Barcode:
Data Type = string
A string generated from applying the extracted text to the file template provided.

Barcode Results:
Data Type = string
An array containing a list of pages and the extracted barcode values

Page Number:
Data Type = string
The page where the barcode was found

Page Barcode:
Data Type = string
A string generated from applying the extracted barcode value to the Barcode Result Template provided.

Zone Values:
Data Type = string[]
An array containing the barcode extracted from each zone.

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.