Sunday, December 25, 2011

Printing on custom paper size in Ubuntu Linux

I'm so surprised that you cannot do that, not when your child is born, not when he graduate high school.  Somebody is waiting for that for his grandson birth announcement.

Basically the software package will allow any paper size.  But the printer typically has a list of papers, but no custom.

I was looking for something that avoid killing any of my brain cells.  But actually I think that's unsolvable.  I made a compromise, looking for a simple offset that I can specify to align things to where I want them.  No luck.

So I decided to solve it once an for all.  The problem:

Typically, you can select a paper on the printer that is not the same as the size on your package that you really want - real.  Typically the printer will place the real paper in the middle of the printer paper.  But for the printing, the real paper is aligned with the upper left corner of the printer paper.  So there is an offset when the real paper is not aligned at the corner, but the middle.

You can set the paper margin on your package to offset this.  Assuming the printer paper is larger than your real paper.  And that your real paper can fed through the printer.

top margin  = desired top margin
bottom margin  length printer - length real + desired bottom margin
right margin = (width printer - width real) / 2 + desired right margin
left margin = (width printer - width real) / 2 + desired left margin

Since you know the dimensions of papers anyway so it's not too bad by using the calculator.  You may even be able to set the software by a macro or script.

2 comments:

Summer Daniels said...
This comment has been removed by the author.
Summer Daniels said...
This comment has been removed by the author.