On Wed, Dec 24, 2014 at 01:22:25AM -0500, Ethan Rosenberg wrote: > On 12/11/2014 04:59 AM, Darac Marjal wrote: > >On Thu, Dec 11, 2014 at 01:54:08AM -0500, Ethan Rosenberg wrote: > >>Dear List - > >> > >>I wish to be able to print a barcode .5 inches from top of the page and centered. > >> > >>I generate the barcode - > >> > >>yes 12345 | head -84 | barcode -p 5x5.0cm -umm -e CODE39 > test.ps; > > > >First of all, try viewing 'test.ps' using ghostview or some other > >postscript viewer. As the saying goes: "Garbage In, Garbage Out". If the > >postscript file isn't right, then you'll end up printing "correct" > >garbage. > > > >> > >>and print - > >> > >>lpr -o media=letter -#1 -P LJ1012 /var/www/test.ps -o page-top=33 -o > >>page-bottom=44 -o page-left=60 -o page-right=80 > > > >Perhaps a matter of preference here, but personally I'd endeavour to get > >the margins, page size etc correct in the post script and then just pass > >a whole page to the printer. In that case, use the '-g' option to > >barcode to size and position the barcode, then use '-p letter' to place > >the barcode on a full sheet. You could then just say "lpr -P LJ1012 > >/var/www/test.ps". > > > >> > >>The barcode is > >>upside down > >>not centered > >>at the very top and truncated > >>and multiple copies are printed. > >> > >>TIA > >> > >>Ethan > --- > I've tried the following and they all give the barcode on the bottom of the page - > > lpr -o media=Custom.5x5cm -P LJ1012 /var/www/test.ps > root@meow:/var/www# lpr -o media=leter -P LJ1012 /var/www/test.ps > root@meow:/var/www# lpr -o media=leter -P LJ1012 /var/www/test.ps > root@meow:/var/www# lpr -o media=leter -o position=top -P LJ1012 /var/www/test.ps > root@meow:/var/www# lpr -o media=leter -o position=bottom -P LJ1012 /var/www/test.ps > root@meow:/var/www# lpr -o media=leter -o position=bottom -P LJ1012 /var/www/test.ps > root@meow:/var/www# lpr -o media=Custom.5x5cm -o position=bottom -P LJ1012 /var/www/test.ps > > I might have an error in my ps file. Here it is.... > > %!PS-Adobe-2.0 > %%Creator: "barcode", libbarcode sample frontend > %%DocumentPaperSizes: 8.5x11.0in Yes. Your Postscript says to use an 8.5"x11" page and then to draw the barcode at the bottom left of that. If you save this to a file and view it with evince, ghostview or whatever, you'll see that. So, what you're trying to do is place an 8.5"x11" page at the bottom/top of a letter sheet. That's not really going to move the contents of the page. So, either print the barcode to a smaller sheet (so your postscript page is smaller) and then locate that on your sheet of letter paper, or keep the postscript page the same as your target, and locate the barcode elsewhere in that. > %%Pages: 1 > %%EndComments > %%EndProlog > > %%Page: 1 1 > > % Printing barcode for "12345", scaled 1.00, encoded using "code 39" > % The space/bar succession is represented by the following widths (space first): > % 01311313111311311113111331111313133111111111331113131133111111131331111131131311 > [ > % height xpos ypos width height xpos ypos width > [75.00 10.50 50.00 0.85] [75.00 14.50 15.00 0.85] > [75.00 17.50 15.00 2.85] [75.00 21.50 15.00 2.85] > [75.00 24.50 15.00 0.85] [70.00 27.50 20.00 2.85] > [70.00 30.50 20.00 0.85] [70.00 34.50 20.00 0.85] > [70.00 36.50 20.00 0.85] [70.00 39.50 20.00 2.85] > [70.00 42.50 20.00 0.85] [70.00 45.50 20.00 2.85] > [70.00 50.50 20.00 0.85] [70.00 52.50 20.00 0.85] > [70.00 55.50 20.00 2.85] [70.00 59.50 20.00 2.85] > [70.00 63.50 20.00 2.85] [70.00 68.50 20.00 0.85] > [70.00 70.50 20.00 0.85] [70.00 72.50 20.00 0.85] > [70.00 74.50 20.00 0.85] [70.00 76.50 20.00 0.85] > [70.00 81.50 20.00 2.85] [70.00 84.50 20.00 0.85] > [70.00 87.50 20.00 2.85] [70.00 91.50 20.00 2.85] > [70.00 94.50 20.00 0.85] [70.00 99.50 20.00 2.85] > [70.00 102.50 20.00 0.85] [70.00 104.50 20.00 0.85] > [70.00 106.50 20.00 0.85] [70.00 109.50 20.00 2.85] > [70.00 113.50 20.00 2.85] [70.00 118.50 20.00 0.85] > [70.00 120.50 20.00 0.85] [75.00 122.50 15.00 0.85] > [75.00 126.50 15.00 0.85] [75.00 129.50 15.00 2.85] > [75.00 133.50 15.00 2.85] [75.00 136.50 15.00 0.85] > > ] { {} forall setlinewidth moveto 0 exch rlineto stroke} bind forall > [ > % char xpos ypos fontsize > [(1) 32.00 10.00 12.00] > [(2) 48.00 10.00 0.00] > [(3) 64.00 10.00 0.00] > [(4) 80.00 10.00 0.00] > [(5) 96.00 10.00 0.00] > ] { {} forall dup 0.00 ne { > /Helvetica findfont exch scalefont setfont > } {pop} ifelse > moveto show} bind forall > % End barcode for "12345" > showpage > > > TIA > > Ethan > > > > -- > To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject > of "unsubscribe". Trouble? Contact listmaster@lists.debian.org > Archive: https://lists.debian.org/549A5BA1.8020600@hygeiabiomedical.com >
Attachment:
signature.asc
Description: Digital signature