How to convert image to PDF and set page size?

With the help of the the command line application ImagePDF Image to PDF Converter, users can easily and accurately convert image to PDF document. This article will act as the guide for how to use this application to realize the functions that you need.

At first, please free download Image to PDF Converter and unzip it to some location of the computer. In the unzipped package, the executable file img2pdf.exe plays the role of the called program in the conversion from image file to PDF document.

If there is no idea about how to use this command line application, please input the file path of img2pdf.exe in MS-DOS interface which is the conversion platform to see the usage of the application. Then the command line usage template will appear like the following one:

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

Image to PDF Converter is able to realize various kinds of functions in the conversion process. The following command line example emphasizes to set PDF page size in the conversion.

The options to be used are –width and –height

img2pdf.exe -width 612 -height 792 C:\in.tif C:\out.pdf
img2pdf.exe –width 753 D:\test.jpg D:\test.pdf
img2pdf.exe –height 852 C:\A.bmp C:\B.pdf

The first example is to set PDF width as 612 and set PDF height as 792.
The second example is to set PDF width as 753 alone.
The last example is to set PDF height as 852 alone.

Please see a successfully run command line in the following snapshot.

convert image to PDF and set page size with Image to PDF Converter

The command line is:

"C:\Program Files\img2pdf\img2pdf.exe" -width 800 -height 600 "C:\Documents and Settings\admin\Desktop\demo\bmp\PH01236U.BMP" "C:\Page Size.pdf"

Where

"C:\Program Files\img2pdf\img2pdf.exe" is the path of the called program img2pdf.exe.
-width 800 -height 600 is to set PDF width and height as 800 and 600 respectively.
"C:\Documents and Settings\admin\Desktop\demo\bmp\PH01236U.BMP" is the path of input image file.
"C:\Page Size.pdf" is the path of target PDF document.

Image to PDF Converter is a Windows Application which can directly convert image files (TIF, JPG, GIF, PNG, BMP, PSD, WMF, EMF, PDF, PCX, PIC, etc.) to PDF files. It is also a stand-alone program which does not require third-party program on the computer. To try this application for free, please click the following button.

free try Image to PDF Converter

Related Posts: