General Purpose Options
Note that some encoders have additional options that are specified in the reference page for the symbology.
inkspread
Amount by which to reduce the bar widths to compensate for inkspread, in points.
- Negative values will increase the bar width
- Using too large values will have an undesired effect
- Example - Code 39 for a printer with very runny ink
- 0 0 moveto (TEZ) (inkspread=0.3) code39 barcode
height
Height of longest bar, in inches.
- Example - For a 0.5 inch tall EAN-13
- 0 0 moveto (TEZ) (includetext height=0.5) ean13 barcode
width
Stretch the symbol to precisely this width, in inches.
- This parameter literally stretches the symbol and text to the desired width which will may distort the human readable text. For information about resizing symbols read the guide to resizing symbols
- Example - For a 2 inch wide Code 93 symbol
- 0 0 moveto (TERRY) (width=2) code93 barcode
includetext
Show human readable text for data in symbol.
- If a character in the data does not have a printable representation then it is not displayed
- Example - Display the text encoded in this Code 39 symbol
- 0 0 moveto (SEE ME) (includetext) code39 barcode
includecheck
Generate check digit(s), where relevant.
- Example - Calculate the optional checksum of this Code 93 symbol
- 0 0 moveto (CHECK ME OUT) (includecheck) code93 barcode
includecheckintext:
Show the calculated check digit in the human readable text.
- For symbologies where the check digit is not manditory, this option must be used in combination with includecheck
- If any part of the checksum does not have a printable representation then that part is not displayed
- Example - Display the check digit of this RM4SCC
- 0 0 moveto (LE28HS9Z) (includecheckintext) royalmail barcode
textfont, textsize, textxoffset, textyoffset
Font name for text, size and offset of the text in points relative to its default position.
- Font name must be the literal name of a PostScript available font
- These options must be used in combination with the includetext option
- Example - Customise the human readable text of this PostNet symbol
- 0 0 moveto (801221905) (includetext textfont=Times textsize=8 texty=-6) postnet barcode
textxalign, textyalign
Overrides the default positioning algorithm for the text.
- By default (in the absence of textxalign or textyalign), each character of text is placed immediately below the corresponding modules where this is possible
- Where there isn't such a direct relationship then the default is to position the text centrally beneath the symbol.
- The textxalign is used to specify where to horizontally position the text, either offleft, left, center, right, offright
- The textyalign is used to specify where to vertically position the text, either below, center, above
showborder, borderwidth, borderleft, borderright, bordertop, borderbottom
Display a border around the symbol of the specified width with the specified margin gap, in points.
Example - Display a customised border around this codabar symbol
0 0 moveto (A3+14-63B) (includetext showborder borderwidth=2 borderbottom=8) rationalizedCodabar barcode
textcolor, barcolor, backgroundcolor, bordercolor
Color of the respective component, either as a hex RRGGBB value or a hex CCMMYYKK value.
Example - Colorized Code 11 symbol using the RGB colour space
0 0 moveto (0123456789) (includetext barcolor=AA0000 textcolor=008888
backgroundcolor=FFFF60 showborder bordercolor=0000FF) code11 barcode
- Example - Colorized Code 11 symbol using the CMYK colour space
- 0 0 moveto (0123456789) (includetext barcolor=AA000000 textcolor=00888844 backgroundcolor=CCCC6000 showborder bordercolor=00FF0088) code11 barcode
guardwhitespace, guardwidth, guardheight
Display whitespace guards or the specified width and height, in points. (Most useful for EANs).
- Usually the encoder specific default value of guardwidth and guardheight are sufficient
- Example - ISBN-13 with tiny whitespace guard
- 0 0 moveto (978-1-873671-00) (includetext guardwhitespace guardwidth=3 guardheight=3) isbn barcode
guardleftpos, guardrightpos, guardleftypos, guardrightypos
Amount of whitespace to guard to left and right of the symbol and vertical position of the guard symbols, in points.
- The encoder specific default value of each of these parameters is normally sufficent
- Example - EAN-8 with very mangled whitespace guards
- 0 0 moveto (01335583) (includetext guardwhitespace guardleftpos=14 guardrightpos=7 guardleftypos=15 guardrightypos=4) ean8 barcode