[SOLVED] Printing non-standard paper sizes on Lexmark E330 via CUPS
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Printing non-standard paper sizes on Lexmark E330 via CUPS
According to the documentation for my Lexmark E330 laser printer (found here), the printer will accept document sizes down to 3x5 inches. I would like to print on index cards. Unfortunately, I'm having a very hard time making this happen.
The printer has a manual feed on the front with paper guides which do, in fact, go down to 3 inches.
I very often use enscript to print text files, so my first attempt was to create ~/.enscriptrc that looked like this:
# Media definitions:
# name width height llx lly urx ury
Media: Notecard 216 320 18 36 198 314
My print command looked like this:
echo "This is a test of the emergency notecard system" | enscript -D ManualFeed -M Notecard
The card fed through the printer correctly, and came out blank.
I ran the same command with no card in the manual feed tray, only to find out that I was getting a 3x5 print area in the lower left hand corner of an letter size page (the print guides center the 3x5 card, so the card had not passed through the area that was not actually printed on).
I tried setting the paper size in Open Office to 3x5, once again, I got the same behavior.
All dimensions are in PostScript points (1/72nd of an inch). I'm not clear on all of the distinctions between PageSize, PageRegion, ImageableArea and PaperDimension; PaperSize and PaperDimension for 'Letter' are both 612x792, which corresponds to 8.5x11. ImageableArea seems to form the printable area on a letter size page. PageRegion... I have no idea abut.
I would love to hear from anyone with any clues as to a) PPD files/PostScript b) Lexmark E330 printers, c) Setting Print Dimensions in CUPS. or d) Any other ideas as to how to approach this problem.
I have to apologize for my original, totally bogus, solution which took this thread off the 0-reply list prematurely. Here are my later results:
Warning: I did my testing on a Brother HL-1240 which centers both the manual feed & the stock in the regular tray. I suspect that it's centering of both is the reason I didn't have to use the "-D ManualFeed" option.
I also did my testing on regular 8-1/2 x 11 paper, but I don't think it makes any difference to my results. BTW, & this may be crucial difference, my results were always at the top of the paper & centered -- right where they should go on a card.
The only thing I see wrong w/ what you did is that 72 pts/in x 5" = 360, not 320.
Since enscript is working for me using your configuration methods, I suspect your problem is in your printer not your enscript configuration. Sorry I couldn't help more. HTH at least a little bit.
Finally, thanks for introducing me to enscript.
Thank you for checking this out for me; it definitely eliminates some variables.
I think that I might be able to set up the media statement so that I'm actually printing in the place where I want on the page... the trouble is that I think that I would end up messing up portrait vs. landscape. I'm quite sure that there is a correct way to do this, after all, the printer is capable of printing envelopes which are not centered the same way as letter stock...
At this point, the part of me that wants to get it right is working harder than the part that just wants to get things running... but neither part has time to fiddle with it right now ;-).
Also, you're welcome for the introduction to enscript. It's one of my favorite unix utilities. You can even pipe it through ps2pdf and create good looking PDF images on the fly.
I restarted cups; at this point 3x5 did show up as a media type in the printer configuration dialog, but when I selected this and tried to print too it, it simply printed as if it were printing to a standard letter size page.
I may lift the 3x5 section of the HP-LaserJet_1320-hpijs.ppd and put it in to the Lexmark_E330.ppd and see if that gives me any better luck, but my curioscity is signifigantly blunted now that I know that I can print index cards in landscape configuration throiugh enscript. This is enough to create a killer hipster PDA, which is really where I was headed with all of this to begin with.
I discovered the "-r" flag but didn't point it out in my post because I thought you knew it already. (LOL)
OTOH, it is good to have it mentioned here for the sake of others reading the thread.
Double thanks for the link -- both for bothering to provide a link (so many don't) & for the interesting article.
It wasn't so much that I didn't know about the -r flag, as that I didn't think that it would work with the media definition that I set up. I figured that when I used the -r flag, it would rotate relative to the letter sized page, rather than relative to the print area that I set up for the index card.
By the way, In earlier versions of the man page for 'enscript', the 'bugs' section used to list 'too many command line options'. Don't know why they removed that comment, it's still true... ;-).