TCM i Kultura Prosta Spółka Akcyjna

libPDFToImage

A library utilizing PDFium to save a page of a PDF document as an image.

Version 1.0.0


Download source: libPDFToImage-1.0.0.tar.xz

Download binary: libPDFToImage-1.0.0-linux-amd64.tar.xz

Headers and binary of PDFium library: Please visit Binary distribution of PDFium and download the latest release for the system that you are using. For a 64-bit Linux distro, it is pdfium-linux-x64.tgz. Before using libPDFToImage, please copy the library libpdfium.so into the folder of libPDFToImage's binary.


The library is released under GNU Lesser General Public License version 3.0, while the executable program is released under Apache License version 2.0.


The library dynamically uses libjpeg, libpng and PDFium library.

The libraries libturbojpeg and libpng are generally installed by default in Linux distributions. If they are not installed, please install the packages of libturbojpeg and libpng.

It is recommended to download PDFium library from Binary distribution of PDFium.


How to Use the Executable Program

pdfToImage <file> [options]

The path of a file or a directory should be enclosed in double quotation marks if there is a space in the path.

Options:

-o <directory>

The path of the folder for saving images.

Without the option, it is the current folder.

A subdirectory will automatically created in the given folder for saving images, and the subdirectory and images are automatically named based on the name of the PDF file.

-d

Generate images with a given dpi.

Without the option, images are generated with 96 dpi.

-s

Generate images with a given pixel size.

For example, "1920" means width pixels, or "x1080" means height pixels, and the size will be changed with the aspect ratio of the PDF page's original size; "1920x1080" restricts both of width and height regardless of the aspect ratio.

Without the option, the pixel resolution of images are decided according to the original size of images with 96 dpi.

-p

The first page is 1.

Page numbers are written like "1, 2, 3-5, -8, 10-" are acceptable.

Without the option, all pages will be saved to images.

-e

jpeg or png.

"jpeg" can be written as "jpg".

The processing of the formats depends on libjpeg and libpng in the system.

Without the option, the program saves images in the format of PNG.

-q

The number from 1 to 100.

TCM i Kultura Prosta Spółka Akcyjna

Article category:

TCM i Kultura Prosta Spółka Akcyjna © All rights reserved.