Implementing PDF Plug in Features

Overview

LEADTOOLS PDF modules enhance the input/output functionality in LEADTOOLS by supporting a number of new powerful and complex file formats including:

Loading Capabilities.

The LEADTOOLS PDF plug-in has the following import capabilities:

  1.  

Loads essentially all PDF 1.3 (Acrobat 4.x compatible) files.

  1.  

Loads all PostScript Language Level 3 files.

  1.  

Loads any EPS file.

The loading support is of course multi-page, where you can specify which page to load from the file and to find the number of pages in a certain document.

The plug-in gives the user a number of control options in order to customize the resulting rasterized page. These options include:

  1.  

Pixel depth. Valid values are 1,4,8 and 24 .The default value for this control parameter is 24. This value is set in the PDFDisplayDepth property.

  1.  

Horizontal resolution in dots per inch with a default value of 96. This value is set in the PDFXResolution property.

  1.  

Vertical resolution in dots per inch with a default value of 96. This value is set in the PDFYResolution property.

  1.  

Ability to use either library installed fonts (fonts installed by the plug in) or system fonts. The default value of this control option is to use library installed fonts. This value is set in the PDFUseLibFonts property.

  1.  

Font anti-aliasing. Valid values are 1bit(no anti-aliasing) , 2 and 4-bit anti-aliasing. The default value is 4, which gives maximum anti-aliasing. This value is set in the PDFTextAlpha property.

  1.  

Graphics anti-aliasing. Valid values are 1bit(no anti-aliasing) , 2 and 4-bit anti-aliasing. The default value is 1. This value is set in the PDFGraphicsAlpha property.

Saving Capabilities.

Full multi-page write support is provided by this module for the PDF format. This plug in lets you append, insert, replace or delete specific pages in a PDF file.

The plug-in gives you a wide range of control options for the resulting image data in terms of compression, including:

  1.  

No compression

  1.  

Compressed using CCITT Group 3, 1 dimension. For 1-bit images.

  1.  

Compressed using CCITT Group 3, 2 dimensions. For 1-bit images.

  1.  

Compressed using CCITT Group 4. For 1-bit images.

  1.  

JPEG compression and YUV 4:4:4 color space loss-less. Bits per pixel: 8 for grayscale, 24 for color.

  1.  

JPEG compression and YUV 4:2:2 color space. Bits per pixel: 8 for grayscale, 24 for color.

  1.  

JPEG compression and YUV 4:1:1 color space. Bits per pixel: 8 for grayscale, 24 for color.

To save a PDF file using the DPI values of the loaded bitmap, set the PDFSaveUseDPI property to TRUE.

To try to use less memory when creating PDF files with either JPEG or Fax compression, set the PDFSaveLowMemory property to TRUE before saving the file.

A number of new save format constants have been added to LEADTOOLS in order to support types of files created by the PDF plug-in. For a list of these, please refer to Summary of All Supported Image File Formats.

Distributing an application built using the PDF Module

The PDF plug-in needs some initialization files in order to work properly. Before distributing an application built using this plug-in, you need to setup the end-user machine with appropriate directories and files. Please follow the steps below:

  1.  

Create a main directory (referred to later as MAIN) on the hard-drive to contain the files. For example "C:\Pdf".

  1.  

Create 3 subdirectories within this "MAIN" directory, please name them "Lib, "Fonts", and "Resource".

  1.  

Copy the contents of the directory "Redist\Pdf\Fonts" to the "Fonts" directory.

  1.  

Copy the contents of the directory "Redist\Pdf\Lib" to the "Lib" directory.

  1.  

Copy the contents of the directory "Redist\Pdf\Resource" to the "Resource" directory.

  1.  

Setup the registry configuration below:

a.

Create the following registry key:

"HKEY_LOCAL_MACHINE\SOFTWARE\LEAD Technologies, Inc.\Pdf"

b.

Under this key create a string value and give it the name "GS_LIB".

c.

Now set the value data of the "GS_LIB" value as follows:

"MAIN\Lib;MAIN\Fonts;MAIN\Resource"

 

If MAIN stands for "C:\Pdf" then this would become

"C:\ Pdf\Lib;C:\ Pdf\Fonts;C:\Resource"