Page 1 of 1

How to create a white A4 rect/pdf page

Posted: 2009-02-22T13:04:11-07:00
by lynx_abraxas
Hello!


I'm wondering how I can create a white A4 pdf page or further I'd like to extend an image with white borders to fill a A4 page. I tried:

Code: Select all

convert -page A4 xc:white white.pdf
but all I get is a single white pixel. The -page-option seems to be the only one that accepts page-sizes like A4.
How would I get it in landscape orientation?

Many thanks for answers
Lynx

Re: How to create a white A4 rect/pdf page

Posted: 2009-02-23T22:02:17-07:00
by anthony
I think you may be using the wrong tool. PDF is a vector image format. ImageMagick works with raster images.
A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector

Re: How to create a white A4 rect/pdf page

Posted: 2009-02-24T09:12:38-07:00
by lynx_abraxas
Well, as far as I know PDF can handle both raster and vector. The thing is imagemagick can put raster images into PDFs (many examples in the net) but if I look at these PDFs they are not at all A4 size. Independen of PDF I'd like to know how I can create a rectangle or extend a pic (fileformat supporting dpi values; eg svg) such that it would have A4 dimensions.
Of course it would be much better to have a PDF of A4 size and a white background without achieving this with lots of white pixels;)
I'm wondering what the option -page A4 is doing and what it is ment for if not for this purpose.

Re: How to create a white A4 rect/pdf page

Posted: 2010-02-03T12:08:10-07:00
by lynx_abraxas

Code: Select all

convert -page A4 rose: white.pdf       #-page A4 has no effect here
convert -page A4 white.pdf white2.pdf  #but here it has !?!
Is this a feature or a bug?

Re: How to create a white A4 rect/pdf page

Posted: 2010-02-03T12:12:27-07:00
by fmw42
try

convert rose: -gravity center -page A4 rose_A4.pdf

or get the pixel size from http://www.imagemagick.org/script/comma ... s.php#page

then

convert rose: -resize 595x842 -gravity center -page A4 rose_resize_A4.pdf

Re: How to create a white A4 rect/pdf page

Posted: 2010-02-03T12:25:06-07:00
by lynx_abraxas
Hm, I tried but both Your examples don't yield an A4 pdf for me.

Re: How to create a white A4 rect/pdf page

Posted: 2010-02-03T13:37:29-07:00
by fmw42
what version of IM are you using? if old, then perhaps you need to upgrade