GetBarcodeValueSource

 

 

#include “BlackIceDEVMODE.h”

 

int       GetBarcodeValueSource (BlackIceDEVMODE* pDevMode);

Description

Returns the source of the barcode value used for generating the barcode.

Parameters

BlackIceDEVMODE* pDevMode               - pointer to the BlackIceDEVMODE structure

Return value

The return value can be one of the values of the BarcodeSource enumeration:

 

enum BarcodeSource

{

            BARCODE_STRING = 0,

            BARCODE_FILE,

            BARCODE_PAGE_CONTENT

};

If BARCODE_STRING (0) is returned, a simple string is used for the barcode value, specified by the SetBarcodeValue function or in the printing preferences.

If BARCODE_FILE (1) is returned, the file specified by the SetBarcodeValueFile function or the printing preferences is used. The file can be a text file or a binary file if the selected barcode type supports it.

If BARCODE_PAGE_CONTENT (2) is returned, the content of the printed page is used as value for the generated barcode. A regular expression and format can be specified using the SetBarcodeRegExpFile and SetBarcodeRegExpFormatFile functions or in the printing preferences, to filter the text. If the regular expression is not specified or not found, the whole page text is used. Please note, some applications might print part of the page content as images or vector graphics, even if it looks like text. In this case, the printer driver will be unable to extract the text of the page. In some cases glyph indexes might be used to print the text instead of ASCII or UNICODE text, in this case the output might contain garbled characters instead if readable text.