AW: [barcode] rotating a barcode

Christoph Pross c.pross@beck-ipc.com
Thu, 14 Nov 2002 08:39:14 +0100


Hi Steve,

I had some problems with PCL a while ago and found out,
that PS uses the xpos and ypos not for the upper left
corner, but for position of the the middle of a bar!
Maybe this solves your problem?

Chris

> -----Urspr=FCngliche Nachricht-----
> Von: s.blood [mailto:steve@copyleft.net]
> Gesendet am: Donnerstag, 14. November 2002 08:14
> An: barcode@lists.linux.it
> Betreff: [barcode] rotating a barcode
>=20
>=20
> Hello.=20
>=20
> I have recently undertaken a barcode project for managing invoices =
and
> inventory at Copyleft.net. I have found GNU Barcode to be incredibly
> helpful -- thanks to all for their work (btw, if any of you=20
> would like a
> shirt or hat or whatever from Copyleft, I'd be more than happy to =
send
> some out as tokens of appreciation for your code which will soon find
> itself used here everyday. Just check out the site and drop=20
> me an email --
> and, yes, I'll happily ship to Italy).
>=20
> At any rate, one small thing I'd like to be able to do is=20
> rotate a barcode
> 90 degrees. I looked through the docs and couldn't find any=20
> mention of it.
> After looking at the postscript output, I tried doing a=20
> regular expression
> which swapped the x and y coordinates. So, this:
>=20
> <snip>
> %  height  xpos   ypos  width       height  xpos   ypos  width
>    [72.00  68.34 280.00  2.54]      [72.00  71.70 280.00  1.19]
>    [72.00  77.07 280.00  3.88]      [72.00  84.46 280.00  5.22]
> </snip>
>=20
> became this:
>=20
> <snip>
> %  height  xpos   ypos  width       height  xpos   ypos  width
>    [2.54 280.00 68.34 72.00]      [1.19 280.00 71.70 72.00]
>    [3.88 280.00 77.07 72.00]      [5.22 280.00 84.46 72.00]
> </snip>
>=20
>=20
> That seemed like a reasonable approach and the result was a=20
> barcode, but
> the bars get munged somehow and are not decodable. I don't know much
> postscript, so I couldn't figure out why that would be. I=20
> assumed the bars
> were just rectangles defined by the above coordinates in which case =
it
> wouldn't matter much if x and y were swapped...
>=20
>=20
> I looked around the web some and found kbarcode which will=20
> allow you to
> rotate a barcode but I couldn't locate the source code=20
> responsible for it.=20
>=20
> There was also a reference to using lout to rotate a barcode=20
> on this list=20
> a couple of years ago:=20
>    http://lists.linux.it/pipermail/barcode/2000-November/000012.html
>=20
> I had some trouble getting lout to cooperate and figured=20
> before getting
> too deep into it, I'd post a message here to see if there's=20
> not a simpler
> way.
>=20
> My use is just calling barcode from a script and=20
> incorporating the output
> into a postscript document. I have no trouble when the barcode is =
read
> left to right.=20
>=20
>=20
>=20
> Any help would be appreciated. Even something as little as "just use
> lout, it'll be the easiest way".
>=20
>=20
> Thanks,
> steve blood
>=20
> _______________________________________________
> barcode mailing list
> barcode@lists.linux.it
> http://lists.linux.it/listinfo/barcode
>=20