[cups.general] Printing PNG edge to edge from command line

James Cammarata James.Cammarata at altertrading.com
Thu Apr 27 08:56:35 PDT 2006


Hi all, we are working on a program here at my company to replace
pre-printed forms for a legacy dot-matrix printer system.  I'm using
a2ps and a combination of ImageMagick and postscript programs to
composite ASCII text over a form file, and the result is a high
resolution PNG image that I would like to print scaled to fit the entire
page with no margins.  I've read the documentation but the commands to
set the page margins are not working for me (page-top, etc.).

Here's the command I'm using:
lp -d printer -o scaling=100 -o page-left=0 -o page-right=0 ... file.png

The printer is using the CUPS LaserJet 1.1 driver, and prints everything
fine.  I can send PS files to it using -o raw and it prints edge to edge
with no problems.  The printer itself is an HP 4350dtn.

I know I could convert the PNG to a PS or EPS file, but they tend to be
pretty big in comparison (almost 1MB per page vs. ~100K per page as a
PNG), and the printers they will be printing to are on 256K leased
lines, so printing 20 pages at 1MB per page would not work very well
(especially double sided forms...).

I've googled for days trying to find the right options to use, can
anybody help with this?





More information about the cups mailing list