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

Anthony Thyssen <[email protected]>
Newsgroups gmane.comp.video.image-magick.user
Message-ID <20091125152806.46aace57@wraith>
On Wed, 25 Nov 2009 02:06:48 +0100
Sebastian Krause <[email protected]> wrote:

| 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
| `----
| 


I have added this to the notes in IM examples, File Formats, PDF
  http://www.imagemagick.org/Usage/formats/#pdf_alturnatives

Question can that perl script 'fix' a PDF that IM generated, or is it
restricted to PDF's created by sam2p??




  Anthony Thyssen ( System Programmer )    <[email protected]>
 --------------------------------------------------------------------------
   It's like being nibble to death by,.. Ah...
   feathers, long bills, webbed feet, go quck?    Molari -- Babylon 5
 --------------------------------------------------------------------------
     Anthony's Castle     http://hobbit.ict.griffith.edu.au/~anthony/
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.