Page 1 of 1

conversion to PDF

Posted: 2013-05-02T18:33:10-07:00
by zaphod
i've run into this before and never found a good answer

i have created a miff file with the following specs as per identify:

geometry of 4400x3400
resolution of 400x400
page geometry of 792x612.

if i use convert (

Code: Select all

convert bar.miff result.png
) to create a png file, i get a file that matches those specs and prints very crisply.

if i convert to a pdf (

Code: Select all

convert bar.miff result.pdf
) i get a pdf file with a very very small image in the lower left corner of the page

from identify -verbose specs of the pdf are

geometry 792x612
resolution 72x72
page geometry 792x612

how should i be using the convert program to create a PDF where the image isn't stuffed into the lower left corner?

Re: conversion to PDF

Posted: 2013-05-02T19:09:10-07:00
by fmw42
try adding +repage

convert bar.miff +repage result.pdf

However IM will stuff the raster image into a vector environment. So you will not get the right size back from converting the pdf to anything else. You would need some external PDF software to extract the images. But I am not sure, you may be better off putting the PNG version into the PDF rather than the miff version.

Re: conversion to PDF

Posted: 2013-05-03T11:57:50-07:00
by zaphod
i tried the +repage option, but it didn't help.

at the end the day the problem was that the display program showed the entire canvas of the pdf (3000x4000 or so) with the small actual image in the bottom. using display on a png file did not do this. hence my confusion.

take this file (called bigx.ps

Code: Select all

%!
0 0 moveto 612 792 lineto 612 0 moveto 0 792 lineto stroke showpage
convert it as follows:

convert -density 400 bigX.ps d400.miff
convert d400.miff d400.png
convert d400.miff d400.pdf

use display to show the two files. both have a huge canvas, but the PNG has the X fill the canvas while the pdf has the X very small and in the lower left corner.

interesting.

the good news is that if i print the pdf with FoxIt or acrobat, it prints at the correct size and crispness meaning that I can send my file to staples/fedex for final printing