pdf to jpg conversion

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
priya
Posts: 2
Joined: 2013-10-21T04:48:43-07:00
Authentication code: 6789

pdf to jpg conversion

Post by priya »

Hi

i am converting pdf to jpg using IM.

i works fine if pdf contains an image and simulteneously resizing same jpg.

1)if by chance pdf does not conatins any image then complete black area is displayed in .jpg file.
2) in second case if pdf not contains image and if we remove -resize command then output generates as expected.

i want to convert plus resize .

what is problem???

i have tried installing latest version of ghostscript but nothing happens.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: pdf to jpg conversion

Post by Bonzo »

You need to post more information e.g. IM version, platform and your command. Also the problem pdf would help.
priya
Posts: 2
Joined: 2013-10-21T04:48:43-07:00
Authentication code: 6789

Re: pdf to jpg conversion

Post by priya »

IM version is ImageMagick-6.8.4-Q16


following is the command for conversion using c#

string arguments = string.Format(@"-density 300 -depth 8 -quality 96 {0} {1} {2} ", "\"" + ImagePath.ToString() + "\"", "-resize \"" + htwd + "\" ", "\"" + filename + "\"");

where ImagePath is souce image i.e .pdf file and htwd is widthXheight to be resize and filename is output file .jpg
Post Reply