[barcode] streaming mode for pcl output
Wolfgang Rohdewald
wolfgang@rohdewald.de
Wed Oct 28 02:04:47 CET 2009
here comes my patch again based against the current
git tree, additionally with an entry in Changelog
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.
--
Wolfgang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: streaming1.patch
Type: text/x-patch
Size: 7062 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/barcode/attachments/20091028/8f334bda/attachment.bin>
More information about the barcode
mailing list