[barcode] streaming mode for pcl output

Wolfgang Rohdewald wolfgang@rohdewald.de
Fri Oct 23 13:14:11 CEST 2009


have you had a chance to look at it meanwhile?

On Sunday 26 July 2009, Wolfgang Rohdewald wrote:
> Hi,
> 
> I needed to add barcode output to a legacy application that
>  generates PCL5. So I tried barcode but since it always does
>  absolute cursor addressing and outputs a form feed I could not
>  have used it like that.
> 
> I was originally planning to deliver several patches but I worked
> against the released 0.98 and only when I was done found the cvs
> online repository. So now it is just one patch but still manageable
> I think.
> 
> It does:
> 
> 1. remove unused variable k from pcl.c
> 
> 2. use relative cursor positioning in pcl.c. Only the first
>    positioning is absolute. This introduces the usage of
>    3 more PCL commands: ESC *v#O, ESC *v#T, ESC &a#P. As
>    far as I know they were always part of PCL5 and all PCL5
>  printers I know support it. Using them is the only way I know to
>  print columns right aligned with PCL (unless you use monospace
>  fonts of course). The produced PCL output is shorter (could be
>  shortened even more but unimportant) and does not contain line
>  feeds anymore.
> 
> 3. introduce a new streaming mode "-s". Only for pcl output and not
>    in table mode (this is checked for). In this mode, everything is
>    done in relative address mode. Default is to position the bar-
>    code such that its text is aligned with previously printed text.
>    After printing the barcode, cursor is at same Y but X is after
>  the barcode, using bc->margin for distancing. In streaming
>    mode, the charset encoding and the font are never changed, it is
>    expected to be done by the surrounding PCL code generated by the
>    printing application.
> 
> 4. allow negative values for -g xoffset and yoffset
>    like -g 30x20+5-1.5 for fine tuning the position.
> 
> 
> Use case: The application might generate a line like
> 
> Reinigungsmittel: EAN13START -b761005201696 -g30x10 EAN13END
> 
> Then a filter will replace that by the output of barcode. Options
> -s and -P are default.
> 
> I also have a python program that scans PCL5 and makes PDF out of
> it, using the PyQt4 libraries. That will become open source too
> some time this year. Of course it only does just what I need.
> It supports defining background images like company logos, and
> since today it also handles barcode output.
> 


-- 
Wolfgang


More information about the barcode mailing list