BARCODE (PCL,PDF, PS) |
Top Previous Next |
Syntax
1. barcode col|{numexpr}, row|{numexpr},"value"|{expr},symbology,height,spc-pixels [,text] [,rotate degrees] [,start char] [,stop char] [,truncate] [,mode mode] [,cols cols] [,rows rows][,notrim] [,security|errorlevel n] [,symbolno n] [,totsymbol n] [,notbc]
2. barcode "text|~regexpr|!=text|!~regexpr[@left,top,right.bottom]", col|{numexpr}, row|{numexpr}, "", symbology, height, spc-pixels, getoffset cols, getcols cols [,eraseoffset cols] [,erasecols cols] [,text] [,rotate degrees] [,start char] [,stop char] [,truncate] [,mode mode] [,cols cols] [,rows rows][,notrim] [,security|errorlevel n] [,symbolno n] [,totsymbol n] [,notbc]
Description
col and row determine the upper left corner of the barcode. If used, numexpr is a Business Basic expression that generates a numeric value for the column or row.
value is a text string, up to 28 characters, to barcode (when using the Support Server, there is no limit on characters). Often this is symbology-dependent. If check digits are required, they are generated internally in UnForm. Within barcode families, if a unique symbology is associated with a specific length, then UnForm will internally select the correct symbology. For example, if a 9-digit zip code is specified with symbology 900 (5-digit post net), then symbology 905 will be used automatically.
expr is an expression that generates the text to barcode.
symbology is one of the following numbers:
height is expressed in points or pixels. If it is an integer, such as 50 or 175, then it is treated as pixels at 300 dpi. If it is a floating-point number, like 18.7 or 12.0 (it contains a decimal point), then it is treated as points (1 point=1/72 inch). The maximum height is 3000 pixels.
spc-pixels is the number of pixels allocated to spacing between bars, from 1 to 50, the default being 2.
In syntax 2, triggered by a quoted value as the first argument, barcodes will be generated at all locations on a page where the text or the regular expression regexpr occurs. The value(s) to barcode will be based upon what text matches occur. Each match will determine the value to barcode based on the word found (up to the first space or the end of the line), and the placement of the barcode. The value to barcode can be adjusted by the getoffset cols (integer columns from the location of the match) and getcols cols (number of columns to use for the value). The location of the barcode can be adjusted by the col and row parameter, where 0,0 is the location where the match is found. The match text found can be erased from the report by setting eraseoffset cols and erasecols cols.
If the syntax "!=text" or "!~regexpr" is used, then the search is for positions NOT equal to the text or NOT matching the regular expression. When using the NOT syntax, only one search is performed per line in the search region.
The search for text or regexpr can be limited to a region on the page by adding a suffix in the format '@left,top,right,bottom'. To use a literal "@" character in text or regexpr, it is necessary to specify "\@".
Normally, UnForm will trim trailing spaces from the value being barcoded. If the notrim option is present, trailing spaces will not be trimmed. This can be critical if the barcode data contains spaces that must be retained. For example, a Code 128 barcode uses encoding that can produce space characters for valid data, so the notrim option should be used to prevent valid data from being truncated.
For 1D symbologies, you can specify 'cols n' to fit the barcode into the specified number of columns (specified in integers), overriding the space-pixel setting. This provides more precise space allocation.
Symbology Notes
Version 10.0 notes The internal barcode engine has been upgraded to use the TEC-IT barcode toolkit, which enables many new features and barcode symbologies, and eliminates the need for the Windows Support Server, which was required for certain features in previous releases. The legacy 1D barcode kit is still available, by specifying a "notbc" option.
Barcodes are now generated before other raster data, such as boxes or text, in order to support human-readable text output. This might change job appearance if boxes or text are drawn on top of the barcode image.
Version 5 Note The positioning algorithm for PDF versions of the barcode was modified in Version 5 to match the positioning of laser barcodes. If your application depends on this older algorithm, then you can modify your ufparam.txt file (preferably by copying it to ufparam.txc and then modifying that file, to avoid losing your changes during an update) to add (or change) 'v4pdfbcd=1' in the [defaults] section.
Drivers: pcl, pdf, ps
Examples:
barcode 10.5,22,{get(10,21,5)},900,12.0,2 will add a 12.0 point high, 5-digit post net barcode based on a zip code found at column 10, row 21.
barcode "bcd:@16,22,20,55",0,0,"",600,75,2, getoffset 4, getcols 10, erasecols 14 will search for data starting with "bcd:" in the region starting at column 16, row 22, through column 20, row 55, barcode the 10 characters following it, and erase the underlying text.
|