convert PDF to JPEG command line utility

i need a utility that i can run from a command line that will 'convert PDF to JPEG command line utility'
rjefAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ITguy565Commented:
Hopefully this helps:

http://www.e-pdfconverter.com/blog/how-to-convert-pdf-to-imagejpgbmptifgif-with-command-line/

e-PDF to Image Converter is a program based on Windows platform, which allows the batch converting of large numbers of PDF files at the same time. e-PDF to Image Converter can be integrated into your own software applications or Web-server applications to convert PDF files to image files (JPG, JPEG, TIFF, BMP, PNG, GIF, TGA, PCX, PNM, RAS, PBM, etc.)
0
Randy DownsOWNERCommented:
Try this

http://www.coolutils.com/Convert-PDF-JPEG-cmd

CoolUtils offers a highly efficient solution for exporting PDF files to image format – convert PDF to JPEG command line utility that is capable of both single and batch conversions with fully adjustable parameters. It is Total PDF Converter X, working on Windows server and available for in-building into any client-server application. It is an ideal solution for local networks or online services where PDF to JPEG conversion is must-have feature.
0
rjefAuthor Commented:
i would like a free one.
0
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Randy DownsOWNERCommented:
Try this

http://www.softpedia.com/get/Office-tools/PDF/Free-PDF-to-JPG.shtml

Command line utility to extract all jpeg files from pdf.

Free PDF to JPG is an easy-to-use command line utility that can help you extract all the jpeg files from a PDF document without any jpeg modifications. Resulting jpegs will be in PDF_to_JPG_files folder and will have names pageXXXX.jpg etc.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
IrfanView is excellent (free!) imaging software that I've been using for many years:
http://www.irfanview.com/

Click the Download link on the left to download IrfanView and click the PlugIns link on the left to download the PlugIns, which are needed to give you PDF capability. Install IrfanView first, then install the PlugIns.

The command line to do what you want is this:

i_view32.exe input_file.pdf /convert=output_file.jpg

That's it! Of course, you'll need the path for i_view32.exe (such as c:\Program Files (x86)\IrfanView) and the path for your input and output files. There are also options, such as JPG quality (/jpgq), which is in the range 1-100. For example:

i_view32.exe input_file.pdf /convert=output_file.jpg /jpgq=75

I have attached a PDF for you with all of the command line options in the latest version (4.36).

Btw, if it's a multi-page PDF, it will convert just the first page to a JPG (with the same file name as the PDF and a file extension of JPG).

IrfanView is an extraordinary piece of FREE software! It also has a great GUI interface. Both the command line and GUI work extremely well. Regards, Joe
IrfanView-4.36-command-line-opti.pdf
0
rjefAuthor Commented:
"C:\Program Files (x86)\IrfanView\i_view32.exe" C:\Fuj Canban\can.pdf /convert=cancan.jpg
it says error can not load c:\fuj can.pdf
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Two thoughts: (1) Did you install the PlugIns? (2) Because of the space in the file name, you should have quotes around it:
"C:\Fuj Canban\can.pdf"
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Note that your input file name is:

C:\Fuj Canban\can.pdf

but IrfanView is saying it can't find:

c:\fuj can.pdf

Btw, I get the same message when specifying a file that doesn't exist:
IrfanView cannot load fileWhen the PDF file exists, IrfanView converts it perfectly to JPG. Regards, Joe
0
rjefAuthor Commented:
what if the pdf is more than 1 page?
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Here's the comment that was in my first post:

Btw, if it's a multi-page PDF, it will convert just the first page to a JPG (with the same file name as the PDF and a file extension of JPG).
That said, it's doable, but you'll need another (free) product, the PDF Toolkit (PDFtk):
http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

The command line (pdftk.exe) has an option called "burst" that splits a multi-page PDF into into individual pages, which can named with a printf-styled format string (default is pg_%04d.pdf, e.g., pg_0001.pdf, pg_0002.pdf, etc.).

Then run IrfanView's convert-to-JPG on the one-page files created with the "burst" option by PDFtk. This is relatively easy to do with any programming/scripting language that can call command line executables (a simple loop will do it). Regards, Joe
0
rjefAuthor Commented:
joe one last question than i will give you the points.  I tried using irfanview to crop a pdf.  it cropped it but the pdf i am cropping has barcodes in it and when i try to print the cropped file the barcodes are not readable by the scanner.  any idea what could be causing this?
0
Joe Winograd, Fellow&MVEDeveloperCommented:
After cropping the PDF, are you converting to JPG? If so, make sure the JPG quality is set to 100. At lower quality, it may produce fuzzy/pixelated barcodes that the scanner can't read.

Similar issue if you're saving it as a PDF after cropping. It may be that the compression setting is causing a large enough reduction in quality so that the scanner can't read the barcode. Here's what the PDF Settings dialog (GUI) looks like when you Save As to a PDF:
PDF Settings - CompressionNote the different compression settings for Color, Grayscale, and Monochrome (black&white). Experiment with different compression techniques and even try no compression (un-check the Activate Compression box). I'm not sure how this translates into the command line call, but just to troubleshoot the barcode/scanner issue, try it in the GUI. Regards, Joe
0
rjefAuthor Commented:
i will try this.  just fyi   when i just open the pdf in irfanview and print it i can not scan the barcodes from the printed pdf
0
Joe Winograd, Fellow&MVEDeveloperCommented:
> when i just open the pdf in irfanview and print it i can not scan the barcodes from the printed pdf

OK, then cropping/converting is not the problem. It's probably the low DPI Postscript settings for the GhostScript plugin. Try this:

Options
Properties/Settings
PlugIns

Look in the Other PlugIns section and click the [Postscript options] button. The DPI is probably set to 96x96. Change it to 300x300. Also, the [Enable Antialiasing] box should be checked (it probably is, but if not, check it). Let me know if this helps.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Hi rjef,
I'm curious where things stand on this. Regards, Joe
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.