Re: Change JPG images to fit into an A4 PDF page

Sebastian Krause <[email protected]>
Newsgroups gmane.comp.video.image-magick.user
Message-ID <[email protected]>
Anthony Thyssen <[email protected]> wrote:
> This is not the final solution. you also need to pad the image to the right
> aspect ratio.  For A4  you will want one dimention to be the sqrt(2) of
> the other. That is part of the definition of the 'A-series'!
>
> Anyone like to try this?

Thanks a lot for the information. While playing around with the
options I found the tool sam2p (http://code.google.com/p/sam2p/)
which is specialized in converting images to PDF files and does
exactly what I need.

So for the archives, what I did was making all the preprocessing
with ImageMagick and then making the final conversation with
sam2p. It even brings a small script to adjust the result to an A4
paper:

,----[ http://sam2p.googlecode.com/svn/trunk/README ]
| Q58. Can sam2p generate a PDF which is scaled proportionally (i.e. keeping
|      the aspect ratio) to a specified page size, and centered on the page?
| 
| A58. No, but the Perl script sam2p_pdf_scale.pl bundled with sam2p can
|      post-process the file created by sam2p. For example, to scale and
|      center a PDF on an A4 paper, do:
| 
|        $ sam2p input.img output.pdf
|        $ sam2p_pdf_scale.pl 595 842 output.pdf
`----

Sebastian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.