Page 1 of 1
keeping same orientation using -define pdf:fit-page=548x
Posted: 2014-03-12T11:28:01-07:00
by henryoswald
Hi,
I am using the new "convert -define pdf:fit-page=548x" which was kindly added in 7.8.8-8 (1)
When I run the following command against a landscape image it auto converts it to portrait
Code: Select all
convert -density 300 -define pdf:fit-page=548x poster.pdf[0] -resize 548x poster.png
i've tried -auto-orient but that did not help. Is there an option to enforce that the same orientation is kept during the conversion process?
Thanks in advance.
1 -
viewtopic.php?f=1&t=25075
Re: keeping same orientation using -define pdf:fit-page=548x
Posted: 2014-03-12T11:40:43-07:00
by fmw42
7.8.8-8
There is no such version. Do you mean 6.8.8.8 beta? 6.8.8.7 is the current release and that does not include this feature.
Perhaps you could post a link to your pdf file or an example one that shows this issue. You can upload to dropbox.com (public folder) and put a link here.
I cannot duplicate your problem using IM 6.8.8.8 beta Q16 Mac OSX using
Code: Select all
convert logo: logo.pdf
im6888beta convert -density 300 -define pdf:fit-page=548x logo.pdf -resize 548x logo_tmp.png
The result is still landscape.
Perhaps there is some other information in your PDF that makes it re-orient to portrait.
What version of IM are you using and what platform?
Re: keeping same orientation using -define pdf:fit-page=548x
Posted: 2014-03-12T12:14:57-07:00
by henryoswald
You are correct, I ment 6.8.8-8 which I built from source running on ubuntu server 12.04
Here is a file which coverts to portrait
https://dl.dropboxusercontent.com/u/2333308/poster.pdf
when converting without "-define pdf:fit-page=548x" the orientation is kept the same.
Advice is very welcome.
Re: keeping same orientation using -define pdf:fit-page=548x
Posted: 2014-03-12T14:21:04-07:00
by dlemstra
It looks like there is an extra option that forces Ghostscript to not change the orientation. I will look into it.
That option does not work... I did however manage to fix it. Since you are building from source you should change -dPDFFitPage to -dPSFitPage on line 648 of coders\pdf.c