Printing Envelopes with Cups and the P1006 [Redacted]
Although it’s not technically a hack, I put some good minutes and iterations into making this work, so here’s a system I cobbled together one late night, when the rent was due and my handwriting bad.
Doing envelopes is not especially straightforward under Linux (as of yet). Open office does have an envelope wizard, but one has to play with the page/printer settings until it prints in the right direction, and then it prints down the middle of the page. Oh, and the HP P1006 does not take a single envelope: it won’t see a full page, and will refuse to print.
To get the printer to take an envelope, you have to combo it with another, full sheet of paper. Merely laying the envelope on the sheet has mixed results: it definitely works, but the envelope tends to move and the addresses come out strangely. Tape may work, but I’m not sure how much abuse the printer will take (I’m guessing a whole lot, but don’t fix what ain’t broke? (Which is actually a bad sentiment: I’m guessing real scientists would look to break things)).
To work around the fact that it seemed nothing could print an envelope correctly, I finally went back to the CLI, and found a new command: lp. This guy prints stuff from the command line, with arguments that control where it prints and how it positions the printing document. Read the man pages for more: the final command I ended up with this
#!/bin/sh
lp -d HP_LaserJet_P1006 -o position=right -o landscape -o com10 $1
Which reminds me, I really need to grab a code formatter for wordpress. Tally ho!
Anyways, save that into a file, chmod it so you can execute it, and pass it the name of the PDF. You can make a envelope PDF with open office just fine.
Hope this helped any poor souls out there.
EDIT: I stand corrected: Openoffice will print in the right orientation, you just have to browse around in the options tab next that is discretely hidden in the envelope wizard. I also found that you do not need a sheet of paper to act as a sabot for the printer. *facepalm*