Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Incorrect Margins in Printing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 461
Location: London,UK

PostPosted: Fri Mar 21, 2003 12:11 pm    Post subject: Incorrect Margins in Printing Reply with quote

Hi,
I have setup a cups printer for HP4100, using postcript driver. The test page is perfect as well as kword print perfectly. The problem comes while printing from kmail/konqueror. In this case the left margin is always cut off resulting in loss of text. Is there any way to specify margins.
Thanks
Back to top
View user's profile Send private message
TooTallForPony
n00b
n00b


Joined: 13 Dec 2002
Posts: 45

PostPosted: Fri Apr 25, 2003 6:20 pm    Post subject: You need to modify the printer's PPD file Reply with quote

I've had this same problem printing to an HP 2200. After poking around a lot, I've discovered that the problem is with the PPD description. Some PPD files specify that the imageable area is equal to the entire area of the page, when in reality that's not true - the printers most likely have 1/4" margins on the sides, and either 1/4" or 1/2" margins on the top and bottom. Most applications don't care, because they'll write their own postscript that fits on the page properly (which is why the test page and kword printed fine for you). However, some applications filter the file through cups, which is where the problem comes in - specifically for text, which cups pushes up against the left edge of the page.

So here's how to fix it:

Find the ppd file for your printer (it should be in the /etc/cups/ppd directory), and change the lines that start with *ImageableArea. The last four numbers specify the left, bottom, right, and top edges of the imageable area, in points (there are 72 points per inch). Add 18 to each of the first two numbers and subtract 18 from each of the second two. If your files still get cut off on the top or bottom, change the numbers by 36 (1/2") rather than 18. Hope this helps!


Last edited by TooTallForPony on Fri Apr 25, 2003 8:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
TooTallForPony
n00b
n00b


Joined: 13 Dec 2002
Posts: 45

PostPosted: Fri Apr 25, 2003 8:25 pm    Post subject: Another (simpler) solution Reply with quote

I just discovered another solution to the problem, which does essentially the same thing but is easier to implement. It's described in the CUPS bugs list here:
http://www.cups.org/newsgroups.php?s510+gcups.bugs+v516

The relevant command is
lpoptions -p printer -o page-left=36 -o page-right=36 -o page-top=36 -o Page-bottom=36

Or use 18 for each number, if that works for you and you like how it looks.
Back to top
View user's profile Send private message
TooTallForPony
n00b
n00b


Joined: 13 Dec 2002
Posts: 45

PostPosted: Fri Apr 25, 2003 8:36 pm    Post subject: PCL is the real culprit? Reply with quote

The story gets more interesting - these HP printers (and many others) are actually capable of printing right to the edge of the page, so the ImageableArea entries in the PPD file are correct. However, the PCL language that's used to talk to the printer has a minimum margin of 1/4" - so it's PCL that's cutting off the edge of the page. Switching to a postscript driver might solve the problem, but then your text would be left-justified to the edge of the paper - but that would let you print borderless images (for example).
Back to top
View user's profile Send private message
MasonMouse
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2002
Posts: 146
Location: Texas, USA

PostPosted: Sat May 10, 2003 6:52 pm    Post subject: Reply with quote

I was having the same problem with my HP855c inkjet and that took care of it. Thanks!
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16090
Location: Colorado

PostPosted: Sat May 10, 2003 11:56 pm    Post subject: Reply with quote

Moved from Desktop Environments.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 461
Location: London,UK

PostPosted: Fri May 16, 2003 3:03 pm    Post subject: Reply with quote

The above solutions didnt work for me. I had to setup kde-margins to solve my problem. This is the lpoptions which worked for me.
#lpoptions
job-sheets=none,none page-left=18 page-right=18 page-top=18 Page-bottom=18 binding=LongEdge InputSlot=Auto PageSize=A4 kde-margin-bottom=18 kde-margin-left=18 kde-margin-right=18 kde-margin-top=18
Back to top
View user's profile Send private message
archetype
n00b
n00b


Joined: 28 Jul 2002
Posts: 20

PostPosted: Sat Apr 17, 2004 6:50 am    Post subject: Reply with quote

almost.

It's not enough to issue the command. You have to restart cupsd. I *wish* someone had pointed this out before.

Also, the above command didn't work for me. Here is the one that worked:

Code:
lpoptions -p HP_deskjet_5550 -o job-sheets=none,none -o page-left=18 -o page-right=18 -o p
age-top=18 -o Page-bottom=18 -o binding=LongEdge -o InputSlot=Auto -o PageSize=letter -o k
de-margin-bottom=18 -o kde-margin-left=18 -o kde-margin-right=18 -o kde-margin-top=18


Also, note I had to specify the real name of my printer (not sure--if you leave -p off, maybe that will work too?).

Thanks guys! Printing is back to normal now in my kde, at least for my first few tests.

--Chris
Back to top
View user's profile Send private message
imsdunn
n00b
n00b


Joined: 06 Sep 2003
Posts: 19

PostPosted: Wed Jun 02, 2004 12:18 am    Post subject: Reply with quote

I am also having the same problems. I am using a Canon MP730, running cupsd with kde. I have tried all of the above options and have had no luck. I did restart cupsd each time afterwards, and still no luck. I have trieds changing the paper size when printing the test page and none of them will fill the entire page. Does anyone else have a Canon and been able to fix this problem? :?
_________________
---------------------
s.dunn
Back to top
View user's profile Send private message
xanderhsia
n00b
n00b


Joined: 08 Jul 2004
Posts: 34

PostPosted: Sat Feb 19, 2005 7:00 pm    Post subject: Reply with quote

I've tried altering the Imageablearea parameters in the ppd file for my HP Inkjet 970Cxi in /etc/cups/ppd and printed several test pages using the file align.ps (installed with ghostscript). However, the printed output never changes in the slightest. They all look exactly the same even when I've radically changed both the Imageablearea and HWMargins variables in the ppd file. After every change, I have restarted cups. Any ideas what I'm doing wrong?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum