How to convert image to PDF and rotate PDF by command line

This article is mainly about how to convert image to PDF and rotate PDF with the command line application Image to PDF OCR Converter.

PDF is short for Portable Document Format, which is the most widely used file format for documents achieving, sharing, exchanging, etc. PDF is compatible with different platforms, so sometimes you may need to convert images to PDF.

Image to PDF OCR Converter is a professional command line application that can convert various image formats to PDF and make different settings such as set page size, resolution, etc. for the created PDF document. The image formats it supports including JPG, PNG, GIF, PCD, PSD, TGA, BMP, TIF, DCX, PIC, EMF, WMF, etc.

Just by following the steps shown below, you can successfully convert image to PDF and rotate the created PDF.

Step 1. Download and unzip

Please free download the package of Image to PDF OCR Converter. Then, please unzip it to a folder in your computer disk. The executable file named img2pdfocr.exe in the unzipped folder is the called program in the MS-DOS command prompt window.

Step 2. Input commands

At first, please open MS-DOS command prompt window in which you are able to input commands. Then, please follow the command line template shown below to input your commands into the opened MS-DOS command prompt window.

img2pdf [options] <Image-file> [<PDF-file>]

Where:

  • img2pdf: call the program. (You need to input the correct path of the called program img2pdfocr.exe.)
  • [options] : set parameters for the conversion.
  • <Image-file>: specify the path of the source image.
  • [<PDF-file>]: specify the path of the target PDF file

To rotate the converted PDF file, you can use the following option: -rotate <int> which is used to rotate PDF pages in angle of 90, 180 and 270.

For example,

D:\img2pdfocr\ img2pdfocr.exe –rotate 90 D:\print.jpg E:\ print.pdf

This example is to convert a JPG image named print.jpg to print.pdf and rotate PDF page in angle of 90.

At last, please hit Enter on your keyboard to run the commands.

Seconds later, you can get the target PDF in the specified location.

This is the end of this article and you can get full version of Image to PDF Converter here.

Related Posts: