Re: A4 to Letter conversion
- From: Ken Sharp <ken@xxxxxxxxxxx>
- Date: Wed, 23 Aug 2006 15:56:49 +0100
In article <1156343526.534403.23200@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
l00sap@xxxxxxx says...
I'm converting a PS file from A4 paper to Letter paper. I have code
that changes 595 and 842 (point size of a4-paper) to 612 and 792. This
works but I would like to scale the file properly. I came across this
code snippet for scaling. But not sure how to use it?
A4 to Letter
"26 0 translate .9397 dup scale"
scale takes two parameters, an x scale factor and a y scale factor. You
know the dimensions of letter (595x842) and you know the dimensions of
A4 (612x792) so all you need to do is apply a scale factor which maps
the x value 595 to 612 and the y value 842 to 792. For example:
612 595 div % x scale factor = 612/595 = 1.0286
792 842 div % y scale factor = 792/842 = 0.9406
scale % apply the scale factor
Because this is anamorphic scaling, you will get differences in the
output (circles will become ellipses for example). The scale you quote
simply scales *both* axes by a factor intended to make the letter fit on
A4, and offsets the origin to centre the letter on the A4 output.
Using this is more problematic, but if you have managed to change the
page size, then I suggest you insert this line immediately after theose
changes.
Ken
.
- Follow-Ups:
- Re: A4 to Letter conversion
- From: arliss
- Re: A4 to Letter conversion
- References:
- A4 to Letter conversion
- From: arliss
- A4 to Letter conversion
- Prev by Date: A4 to Letter conversion
- Next by Date: Re: A4 to Letter conversion
- Previous by thread: A4 to Letter conversion
- Next by thread: Re: A4 to Letter conversion
- Index(es):
Relevant Pages
|