Navigation: DocScript Reference > DocScript Functions >

Barcode Functions

 

 

 

 

Function

Description

[Barcode.IsValidFileFormat](filenameext)

Checks whether the file extension is a valid format. DocScript can read barcodes on either TIFF or PDF images files.

[Barcode.ReadPatch](boolval)

Set the barcode type as a patch code.

 

[Barcode.ReadCode11](boolval)

Sets the barcode type as Code 11.

 

[Barcode.ReadCode39](boolval)

Sets the barcode type as Code 39.

 

[Barcode.ReadCode128](boolval)

Sets the barcode type as Code 128.

 

[Barcode.ReadCodaBar](boolval)

Sets the barcode type as CodaBar.

 

[Barcode.ReadInter2of5](boolval)

Sets the barcode type as Inter2of5.

[Barcode.ReadEAN13](boolval)

Sets the barcode type as EAN13.

 

[Barcode.ReadEAN8](boolval)

Sets the barcode type as EAN8.

 

[Barcode.ReadUPCE](boolval)

Sets the barcode type as UPCE.

[Barcode.ReadAdd2](boolval)

Sets the barcode type as Add2.

 

[Barcode.ReadAdd5](boolval)

Sets the barcode type as Add5.

 

[Barcode.ReadDataMatrix](boolval)

Sets the barcode type as Data Matrix.

 

[Barcode.ReadQRCode](boolval)

Sets the barcode type as QR Code.

 

[Barcode.ReadPostNet](boolval)

Sets the barcode type as PostNet Code.

 

[Barcode.ReadRM4SCC](boolval)

Sets the barcode type as RM4SCC Code.

 

[Barcode.ReadUPCA](boolval)

Sets the barcode type as UPCA Code.

 

[Barcode.SetAllFormatsTo](boolval)

Sets all formats to be read. Care must be taken when using this option as it will reduce performance.

[Barcode.ScanRight](boolval)

Scans barcode from right to left of the page.

[Barcode.ScanLeft](boolval)

Scans barcode from left to right of the page.

[Barcode.ScanUp](boolval)

Scans barcode from the bottom to the top of the page.

[Barcode.ScanDown](boolval)

Scans barcode from the top to the bottom of the page.

[Barcode.ThresholdLevel](intval)

Default to 0, variation in the accuracy of the scan.

[Barcode.ScanInterval](intval)

Used in conjunction with Threshold and determines the scan interval.

[Barcode.SetReadArea](X,Y,Width,Height)

Sets the scan area of a barcode. This is used if the process is picking up other barcodes on the page. This function specifies a specific area to read the barcode. Parameter values are in pixels.

[Barcode.BarcodesToRead](numberofbarcodestoread)

Sets the number of barcodes to read.

[Barcode.SetAllDirectionsTo](boolval)

Sets all directions. Care must be taken when using this option as it will reduce performance.

[Barcode.Read](filename)

Reads the barcode once the rules are set.

[Barcode.SetDespeckle](value)

Set value to 1 to despeckle each page before detecting barcodes. Set value to 0 to not despeckle. The default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.

[Barcode.SetDilate](value)

Set value to 1 to dilate each page before detecting barcodes. Set value to 0 to not detect. The default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.

[Barcode.SetErode](value)

Set value to 1 to erode edges on each page before detecting barcodes. Set value to 0 to not erode edges. The default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.

[Barcode.SetInvert](value)

Set value to 1 to invert each page before detecting barcodes. Set value to 0 to invert. The default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.

[Barcode.SetSharp](value)

Set value to 1 to sharpen each page before detecting barcodes. Set value to 0 to not do this. By default is 0. Warning: May improve detection percentage on degraded images, but will decrease recognition speed.

[Barcode.SetRenderMode] (value, dpi)

Set value to RENDER to re-render each page at the dpi specified. This may improve detection performance if the page image dpi is less than 200dpi.

 

Set value to IMAGE to use the page image. In IMAGE mode dpi is ignored. The render mode is set to IMAGE by default. Warning: RENDER mode is slower that IMAGE mode.

[Barcode.SetFilter](filter1,….,filterN)

Set one or more regex filters. Barcode.GetPages will only return barcodes whose contents match one or more of the filters.

[Barcode.AddFilter](filter1,….,filter)

Add one or more regex filters. Barcode.GetPages will only return barcodes whose contents match one or more of the filter.

[Barcode.ClearFilter]()

Remove all barcode regex filters.

[Barcode.GetPages](filename)

Returns an array of pages that the barcode was found.

 

Parameter(s)

filename - Typically this would be the filename of the current document {fdocname}.

[Barcode.GetOrientations](filename)

Returns an array of orientations for the barcodes found.

 

Parameter(s)

filename - Typically this would be the filename of the current document {fdocname}.

[Barcode.ReadAndGetPages](filename)

Returns a 2 dimensional array pages and the symbology of the detected barcodes.

 

Parameter(s)

filename - Typically this would be the filename of the current document {fdocname}.

[Barcode.FilterRepeats]()

Set to either 1 or 0.

1 - find the same barcode more than it just gives the first one.

0 - returns all barcodes.

a

 

 

 

Copyright © 2024 Portford Solutions Group, Inc.