What LPR arguments do I need to print a 1400×800 pixel image on a 4×6 label

cupslprnetwork-printerprintingups

This is driving me nuts. UPS sends our system a 1400×800 GIF image of a shipping label, which is supposed to fit nicely on a 4×6 page.

Unfortunately, I can't seem to get the command line options right to make it happen.

We're using an Eltron/Zebra 2844 with a network adapter, and printing from our Ubuntu 8.04 server using CUPS. We're using the correct drivers, and test pages print correctly.

No matter what I try though, it insists on printing the UPS labels accross 6 pages, with a little bit of the label on each page, or way too small.

I've tried a bazillion different lpr settings, most of them producing garbage. The closest I've gotten is this:

    lpr -P Eltron2844 -o natural-scaling=55 -o page-right=0 -o page-left=0 -o landscape -o media="4x6" ./1ZY437560399620027.gif

but it causes the image to be too small on the page. It's about an inch too short, and there's a 1/2" margin on both sides. If I bump the scale up to 56, it explodes the image onto two pages, and squashes it.

Any ideas?

Best Answer

Have you tried converting the gif to a postscript file? If you have imagemagick you can use:

convert 1ZY437560399620027.gif 1ZY437560399620027.ps

and print that? You can also use print to file in gimp or others.

I'm assuming the issue is that lpr is going through a helper application that is creating the margins you have a problem with.

Best of luck,
João Miguel Neves

Related Topic