[barcode] New version of Barcode front end available for testing

Richard Nolde rnolde@ltgc.com
Mon Dec 4 19:29:27 CET 2006


List members:
   I have written an updated version the barcode frontend based on the 
current CVS tree that offers a number of enhancements. The original API 
for the library remains in tact and it produces what I think is correct 
output for the sample program distributed with the library for both 
Postscript and PCL. Here is a list of the basic changes, which are 
limited to the following files: barcode.h, main.c, library.c, ps.c, 
pcl.c. (none of the encoder files was touched).  There is a new file, 
fonts.c that includes the font support functions described below. I have 
built an RPM for redhat derived systems if anyone would like to test it 
or I can send the source code for the new and modified files only as a 
tarball.  Since our antispam software blocks much of Italy and numerous 
other countries except for specific IP addresses, you may need to reply 
to the list or send me email directly at  nrichard8  @ qwest dot  net if 
you don't get a reply in a reasonable amount of time.  All the current 
encodings from the CVS tree are supported unaltered.

Note that the original behavior should not be affected if you do not use 
any of the new option flags and this appears to be confirmed by the 
sample program runs that I have done except that I have defined the 
default height as 40 points instead of 80 points.  The default text 
height is still 10 points.

Changes/enchancements:

Created #define XXX statements in barcode.h to replace most of the 
hardcoded size related constants in main, ps, pcl files, eg
#define DEFAULT_BARCODE_HEIGHT 40

Modified get_page_geometry to accept paper names so that these can be 
used when libpaper is not available. The table of paper names and sizes 
is the same as the one used by libpaper and can be edited if you wish.  
I have built an RPM of libpaper as well if anyone wants it.

Standardized the edge reference for offsets to the top-left corner of 
the page for both Postscript and PCL. You can now specify a position on 
the page explictly and not worry about whether you have a Postscript or 
PCL printer.

Added an origin reference option that will allow you to specify multiple 
barcodes begin at the top or bottom of the page, regardless of whether 
the output is Postscript or PCL.

Added options for explicit horizontal and vertical offsets on the page 
for printing single barcodes at exact locations on the page, with or 
within the default margins.

Added an option to disable the default margins so that the edge of the 
barcode can be precisely located on the page.  Without this option, the 
edge of the barcode is offset from the position by the size of the 
default margin or any user specified margin.

Added options for explicit horizontal and vertical spacing within 
tables, with or without the default margins.

Added an option to print a barcode at a specific height, setting the 
width with a scale factor of 1.0.

Added an option to specify Postscript font names and heights for both 
Postscript and PCL fonts that are available in recent HP printers, eg 
Helvetica@12.  This is only available when the encoding produces output 
below the bars and spaces and there are no descending bars to interrupt 
the flow of text.  When a fixed font is specified, the text will be 
properly kerned and centered under the barcode.

Added PJL support for modern HP printers since these do not seem to 
eject the page in PCL mode without PJL headers.  This, and the trailing 
formfeed can be disable with another option so that raw PCL and be 
output for inclusion in PCL data streams that are produced by an 
application which acts as its own printer driver.  If user requests 
warrant it, I can separate the PJL from the option to disable the formfeed.

Let me know if anyone wants to test this code.

Richard Nolde


More information about the barcode mailing list