I have another blog that doesn't suck. Archive:
Comments disabled |
I spent two hours today figuring out why the margins were chopped off
this thing I was printing. It was a long diff file, and I was trying
to print it with First I wasted a lot of time tinkering with the CUPS PPD file for the printer. It has a lot of stuff that looks like this:
and it's not real clear how these things are related or which of these 10 numbers needs to be changed. Okay, the printer was only cutting off the two short edges, not the two long ones, so we can rule out half the numbers that refer to width dimensions rather than length ones. And tinkering with the first two lines didn't change the output at all (what are they for, anyway?) so really there are only three numbers to play around with: the 36, the 783, and the 792. I messed around with those and printed 26 test pages with the same content in 26 slightly different positions, labeled each one with the magic numbers that produced it and tried to develop a theory about what the numbers actually meant. And I did develop a good model and I thought I understood more or less what they were doing, except that it didn't solve my problem because the content was somehow cut off in every single one of those 26 pages. That 26 doesn't count the three times I choked the printer by trying to supply negative values in place of the 36. One complication was that there is at least two ways for the content to be cut off. It could be cut off because CUPS thought it would be outside the printable area, and so didn't bother to render it there, or it could be cut off because it was outside the printable area, and so even though CUPS rendered it, the printer couldn't put any ink there. If the cutoff is far enough from the actual paper edge, you can be sure it was the first thing and not the second, but that is no help because what you really want to know is what is going on when the cutoff is near the edge. At last by comparing the standard system test page and the printed
output of
No, that wasn't it. That would have cut off the long sides, not the
short sides, because A4 is longer and narrower than US letter. And
anyway, I was printing on a Hewlett-Packard Deskjet D4360. And apparently
letter-size paper somehow becomes different when it is inserted into a
Hewlett-Packard Deskjet. It is no longer And that's what I did with a small but appreciable fraction of my ever-diminishing remaining lifetime.
|