Portable Document Format (PDF)

The Portable Document Format (PDF) was developed by the Adobe Corporation to allow the exchange and viewing of electronic documents easily and reliably, independent of the environment in which they were created. This format allows large documents to be compressed.

It is possible to speed up the loading of large PDF files. For more information, refer to Using Filter Data to Speed up Loading Large Files.

LEADTOOLS can read and write several versions of PDF. The following table summarizes the support:

PDF Version Read Write
PDFv1.2 Supported No flags
PDFv1.3 Supported ESO2_PDF_V13
PDFv1.4 Supported ESO2_PDF_V14
PDFv1.5 Supported ESO2_PDF_V15
PDFv1.6 Supported ESO2_PDF_V16
PDFv1.7 Supported ESO2_PDF_V17

The PDF Filter supports loading encrypted PDF files with 40bit RC4, 128bit RC4, 128bit AES and 256AES v3.0 encryption.

The PDF Filter supports saving PDF/A format. To save files as PDF/A-1b, set the ESO2_PDFA_PROFILE flag in the SAVEFILEOPTION structure. PDF/A does not support all compression formats (see https://www.pdfa.org/wp-content/until2016_uploads/2011/08/pdf-a_a_look_at_the_technical_side-2b.pdf for more details). Therefore, do not use this flag in conjunction with FILE_RAS_PDF_LZW.

This filter can save large images by setting the ESO_PDF_SAVE_LOW_MEMORY_USAGE flag in the SAVEFILEOPTION structure. It can also load files that are stored in memory (memory files). It can both load and save PDF files that are JPEG, LZW, CCITT G1 1D, CCITT G3 2D, or CCITT G4 compressed, or are uncompressed. In addition, this filter supports saving JBIG2 and JPEG2000 compressed data. (Note that JBIG2 is only available for PDF 1.4 or later, and JPEG2000 is only available for PDF 1.5 or later.)

In addition, it supports an option that disables the cropping of files (by setting the PDF_DISABLE_CROPPING flag in the FILEPDFOPTIONS structure), and an option that disables the use of CIE colors (by setting the PDF_DISABLE_CIECOLORS flag in the FILEPDFOPTIONS structure). Disabling the use of CIE colors will result in faster loading of PS files.

This filter supports reading and writing PDF Annotations.

This filter supports loading PDF portfolio and attachments. See the PDF Portfolio topic for more information.

This filter enhances PDF page extraction (avoids producing broken files when PDF files have internal links).

Support for this format is available in the LEADTOOLS PDF Pro, Pro Suite, and the Document and Medical toolkits.

LEADTOOLS supports loading this format as a raster image or as an SVG (Scalable Vector Graphics) document. For more information, refer to L_LoadSvg and Working with SVG.

Saving JBIG2-compressed PDF files requires a LEADTOOLS PDF Pro, Pro Suite, or one of the Document and Medical licenses.

The file constants associated with this file format are:

Constant Read Support Write Support Description
FILE_RAS_PDF Yes * 1, 2, 4, 8, 24 BPP [146] Raster PDF uncompressed.
FILE_RAS_PDF_JBIG2 N/A * 1 BPP [188] Raster PDF with JBIG2 Compression.
FILE_RAS_PDF_G3_1D N/A * 1 BPP [147] Raster PDF with G3 1D Compression.
FILE_RAS_PDF_G3_2D N/A * 1 BPP [148] Raster PDF with G3 2D Compression.
FILE_RAS_PDF_G4 N/A * 1 BPP [149] Raster PDF with G4 Compression.
FILE_RAS_PDF_LZW N/A * 1, 2, 4, 8, 24 BPP [179] Raster PDF with LZW Compression.
FILE_RAS_PDF_JPEG N/A * 8 BPP (Grayscale) [150] Raster PDF with JPEG 4:4:4 Compression.
24 BPP
FILE_RAS_PDF_JPEG_422 N/A * 24 BPP [151] Raster PDF with JPEG 4:2:2 Compression.
FILE_RAS_PDF_JPEG_411 N/A * 24 BPP [152] Raster PDF with JPEG 4:1:1 Compression.
FILE_RAS_PDF_CMYK N/A * 24 BPP [333] Raster PDF with uncompressed CMYK data.
FILE_RAS_PDF_LZW_CMYK N/A * 24 BPP [334] Raster PDF with LZW Compressed CMYK data.
FILE_RAS_PDF_JPX N/A * 24 BPP [388] Raster PDF with Jpeg2000 Compression.

* When requesting file information about a PDF file, FILE_RAS_PDF will always be returned for the file format, regardless of the composition of the PDF file. LEADTOOLS can read PDF documents that are made up of both text and images. The text and images are rasterized into one raster image for each page of the document. LEADTOOLS can write PDF documents that are made up of raster images only.

Required DLLs and Libraries

LEADTOOLS supports writing/saving using LEADTOOLS Document Writers. For additional support details, refer to the following:

Related Formats


Win32, x64.

Help Version 21.0.2021.3.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help