Hi
I've done a fait bit of googling and trying out different options, but I can't seem to achieve what I need.
I need to be able to take a pdf, convert to a 1200dpi jpg, and then produce a new pdf from there (effectively flattening the pdf). The quality needs to be high.
If convert.exe can do this in one go, great, but I'm happy if I can just get a good quality jpg and then worry about converting to pdf afterwards.
Can someone help me with the convert command line needed for this? - I've tried playing with -resize, -density, -flatten, -geometry, -resize etc etc and I get varying results, but not the nice high-res jpg I'm looking for, so I'm obviously not understanding them properly.
Thanks!
Converting pdf to jpg (or flat pdf)
-
- Posts: 4
- Joined: 2019-03-29T09:07:10-07:00
- Authentication code: 1152
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting pdf to jpg (or flat pdf)
What version of IM, on what platform. I'll assume IM v7. If you use v6, use "convert" instead of "magick".
How about:
If you want just the first page:
How about:
Code: Select all
magick -density 1200 in.pdf out.pdf
Code: Select all
magick -density 1200 in.pdf[0] out.pdf
snibgo's IM pages: im.snibgo.com
-
- Posts: 4
- Joined: 2019-03-29T09:07:10-07:00
- Authentication code: 1152
Re: Converting pdf to jpg (or flat pdf)
Thanks for your reply - I'm using IM7 by the way.
Your examples seem simple enough, but when I try it with either convert or magick, I get this:
I'll try re-installing and see if that helps.
Your examples seem simple enough, but when I try it with either convert or magick, I get this:
I'll try re-installing and see if that helps.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting pdf to jpg (or flat pdf)
How are you running the program? I showed you commands that you can type at the command line. This means in a command window, aka command prompt, aka terminal, aka console, aka cmd.exe.
Check that these commands work:
Check that these commands work:
Code: Select all
magick rose: r.png
magick r.png r.jpg
snibgo's IM pages: im.snibgo.com
-
- Posts: 4
- Joined: 2019-03-29T09:07:10-07:00
- Authentication code: 1152
Re: Converting pdf to jpg (or flat pdf)
I'm running via command line.
I uninstalled and then re-installed. I installed 'Win64 dynamic at 16 bits-per-pixel component' this time, so maybe I got the wrong install file previously?
In any case, it works fine now - thanks!
I uninstalled and then re-installed. I installed 'Win64 dynamic at 16 bits-per-pixel component' this time, so maybe I got the wrong install file previously?
In any case, it works fine now - thanks!