The PDF module enhances the input/output functionality in LEADTOOLS by supporting a number of powerful and complex file formats including:
PDF - PDF stands for Portable Document Format. It was developed by Adobe Corporation to allow users to exchange and view their electronic documents in an easy and reliable way, independent of the environment in which these documents were created. A PDF file looks the same on the screen and in print regardless of what kind of machine you are using or which software package was used to create that file. One major advantage of PDF is that a large document can be compressed small enough to download very quickly, and still display content as if you were looking at the original source such as a book or magazine. LEADTOOLS supports versions 1.2, 1.3, 1.4, 1.5, 1.6, and 1.7 (read/write) of the PDF standard. To save a file as PDF version 1.4, set the CodecsPdfSaveOptions.Version property to CodecsRasterPdfVersion.V14. To save a file as PDF version 1.5, set the CodecsPdfSaveOptions.Version property to CodecsRasterPdfVersion.V15 and so on.
PDF/A - LEADTOOLS supports the PDF/A subset of the standard, which contains only those features that are suitable for long-term archiving. To create a PDF/A file, set the CodecsPdfSaveOptions.Version property to CodecsRasterPdfVersion.PdfA.
PDF is emerging as a powerful format for reproducing documents over the web. Because of its high precision and accuracy in representing text and pictures along with its "hyper" nature, PDF is becoming a popular alternative to HTML and Postscript.
PS - Postscript is a simple interpretive page description language. Its primary application is to describe the appearance of text, graphical shapes, and sampled images on printed or displayed pages. Some of the page description and interactive graphics capabilities of the PostScript language include arbitrary shapes, painting operators, text fully integrated with graphics and sampled images derived from natural sources. Postscript is the language that most advanced laser printers use in order to render electronic information on a printed page.
EPS - EPS stands for encapsulated PostScript. An EPS file is a PostScript language program describing the appearance of a single page. Usually, the purpose of the EPS file is to be embedded inside another PostScript language page description. The EPS file can contain any combination of text, graphics, and images, and it is the same as any other PostScript language page description with only a few limitations.
LEADTOOLS PDF has the following import capabilities:
Loads essentially all PDF 1.3 (Acrobat 4.x compatible) through PDF 1.7 files.
Loads all PostScript Language Level 3 files.
Loads any EPS file.
Loading support includes multi-threading support and multipage support, where you can specify which page or range of pages to load from the file.
LEADTOOLS gives you a number of control options in order to customize the rasterized page. These options include:
Pixel depth. Valid values are 0 (for auto-detect) 1, 4, 8 and 24. The default value for this control parameter is 24.
Horizontal and vertical resolution in dots per inch with a default value of 96 by 96. It is recommended you change these to 300 if your application is loading the PDF files for recognition purposes (OCR or barcode for example) by using CodecsRasterizeDocumentLoadOptions.
Font anti-aliasing. Valid values are 1bit (no anti-aliasing), 2 and 4-bit anti-aliasing. The default value is 1, which gives the sharpest representation of the text in the file.
Graphics anti-aliasing. Valid values are 1bit (no anti-aliasing), 2 and 4-bit anti-aliasing. The default value is 1.
Use CodecsPdfOptions to set control options for loading a file.
Use the RasterCodecs.GetRasterPdfInfo method to get information specific to a PDF file on disk or in a stream. Such information includes its original bits/pixel, compression, size and resolution.
Full multipage write support is provided by LEADTOOLS for the PDF format. You can append, insert, replace or delete specific pages in a PDF file created by LEADTOOLS.
LEADTOOLS PDF gives you a wide range of control options for the resulting image data in terms of compression, including:
Compressed using CCITT Group 3, 1 dimension. For 1-bit images.
Compressed using CCITT Group 3, 2 dimensions. For 1-bit images.
Compressed using CCITT Group 4. For 1-bit images.
JPEG compression and YUV 4:4:4 color space loss-less. Bits per pixel: 8 for grayscale, 24 for color.
JPEG compression and YUV 4:2:2 color space. Bits per pixel: 8 for grayscale, 24 for color.
JPEG compression and YUV 4:1:1 color space. Bits per pixel: 8 for grayscale, 24 for color.
A number of save format constants are provided to support types of files created by LEADTOOLS. For a list of these, please refer to Summary of All Supported Image File Formats.
LEADTOOLS also gives you control over the type of encoding to be used in order to change compressed image data into a text format. The text encoding techniques include:
No text encoding at all.
Use ASCII 85 text encoding algorithm.
Use ASCII HEX text encoding technique.
In order to specify which type of text encoding to use when saving, refer to TextEncoding.
LEAD provides the CodecsPdfOptions.Save property in order to specify which type of text encoding to use when saving and to let you control the security of and access to the PDF file that is saved. These include user and owner passwords, encryption options, and the capabilities the user of the resulting PDF document will have. To determine or set the current options used when saving a PDF file use CodecsOptions.Save.
To load or save PDF documents to/from a raster image in LEADTOOLS, use the Leadtools.Pdf.dll assembly. This is the file filter for the PDF format (as well as Postscript and Enhanced Postscript). Use this assembly as any other file filter in LEADTOOLS, such as Leadtools.Codecs.Bmp.dll for BMP support or Leadtools.Codecs.Tif.dll for TIF support.
In addition to Leadtools.Pdf.dll, the Leadtools.Pdf.Utilities.dll assembly is required in the following situations:
When loading Postscript (PS) or Enhanced Postscript (EPS) files. This is always needed regardless of the value of the UsePdfEngine option described below.
When the value of CodecsPdfLoadOptions.UsePdfEngine is set to true (the default value is false). When this option is used, then LEADTOOLS will use both Leadtools.Pdf.dll and Leadtools.Pdf.Utilities.dll when loading PDF files. This is provided for legacy support.
Leadtools.Pdf.Utilities.dll contains many resources such as tables and fonts required to render a PDF image (if one of the options above is satisfied and also always for PS and EPS files). This DLL is not referenced in a direct way by the file filter; instead it is loaded dynamically and out of a process if needed. You must ensure that this DLL is present on the machine. By default, it is required to have this DLL in the same directory where the file filter is located. However, to share many instances of the Leadtools.Pdf.Utilities.dll assembly between many applications, use the CodecsPdfOptions.InitialPath property.
Note that when an application is only loading and saving PDF files as raster images, the PDF Engine is not required. In such cases, the Leadtools.Pdf.Utilities.dll is not required to be present on the machine. Leadtools.Pdf.dll is always required, regardless.
In addition to these DLLs, other DLLS may be needed when saving PDF files because of the compression used. For more information, refer to Files To Be Included With Your Application.
RasPdf, RasPdfLzw, RasPdfG31Dim, RasPdfG32Dim, RasPdfG4, RasPdfJbig2, RasPdfJpeg, RasPdfJpeg422, RasPdfJpeg411, RasPdfCmyk, RasPdfLzwCmyk, and RasPdfJpx formats require, in addition to the Leadtools.dll, the following DLLs: Leadtools.Codecs.dll, Leadtools.Codecs.Fax.dll, and Leadtools.Color.Conversion.dll.