Class BarcodeTool
java.lang.Object
com.logicaldoc.barcode.automation.BarcodeTool
Class to extract barcode contents from inside the Automation
- Since:
- 8.1
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionExtracts all the barcodes scanning the whole documentExtracts all the barcodes scanning a given fileextractBarcode(com.logicaldoc.core.document.Document doc, BarcodeSpec zone) Extracts the barcode in a given zone of a documentextractBarcode(com.logicaldoc.core.document.Document doc, String possibleFormats) Extracts the first barcodeextractBarcode(String filePath, BarcodeSpec zone, String tenant) Extracts the barcode in a given zone of a fileextractBarcode(String filePath, String tenant, String possibleFormats) Extracts the first barcode scanning a given filevoidprocessDocument(com.logicaldoc.core.document.Document doc, String username) Processes a document trying to fill the fields using the barcodes the barcodeswriteEncoded(String format, String code, int width, int height, boolean label) Generates the barcode and returns the Base64 encode of the resulting imagewriteQRCode(String code, int size) Generates the QR code and returns the Base64 encode of the resulting image
- 
Constructor Details- 
BarcodeToolpublic BarcodeTool()
 
- 
- 
Method Details- 
extractExtracts all the barcodes scanning the whole document- Parameters:
- doc- the document to process
- possibleFormats- optional list of barcode formats
- Returns:
- the found barcode values ordered by position
 
- 
extractExtracts all the barcodes scanning a given file- Parameters:
- filePath- path of the file to process
- tenant- name of the current tenant
- possibleFormats- optional list of barcode formats
- Returns:
- the found barcode values ordered by position
 
- 
extractBarcodeExtracts the first barcode- Parameters:
- doc- the document to process
- possibleFormats- optional list of barcode formats
- Returns:
- the found barcode
 
- 
extractBarcodeExtracts the first barcode scanning a given file- Parameters:
- filePath- path of the file to process
- tenant- name of the current tenant
- possibleFormats- optional list of barcode formats
- Returns:
- the found barcode
 
- 
extractBarcodeExtracts the barcode in a given zone of a document- Parameters:
- doc- the document to process
- zone- the zone to consider
- Returns:
- the found barcode
 
- 
extractBarcodeExtracts the barcode in a given zone of a file- Parameters:
- filePath- the path of the file to process
- zone- the zone to consider
- tenant- name of the current tenant
- Returns:
- the found barcode
 
- 
processDocumentProcesses a document trying to fill the fields using the barcodes the barcodes- Parameters:
- doc- the document to process
- username- the user in whose name the method is run
 
- 
writeEncodedGenerates the barcode and returns the Base64 encode of the resulting image- Parameters:
- format- The barcode format (CODE_128, QR_CODE ...)
- code- The content of the barcode
- width- width of the resulting image
- height- height of the resulting image
- label- If the code should also printed as plain text
- Returns:
- The barcode image base64 encoded
 
- 
writeQRCodeGenerates the QR code and returns the Base64 encode of the resulting image- Parameters:
- code- The content of the barcode
- size- dimension of the resulting square image
- Returns:
- The barcode image base64 encoded
 
 
-