FILEPDFOPTIONS

typedef struct _FILEPDFOPTIONS 
{ 
   L_UINT uStructSize; 
   L_BOOL bUseLibFonts; 
   L_INT nDisplayDepth; 
   L_INT nTextAlpha; 
   L_INT nGraphicsAlpha; 
   L_UCHAR szPassword[FILEPDFOPTIONS_MAX_PASSWORD_LEN]; 
   L_UINT uFlags; 
} FILEPDFOPTIONS, *pFILEPDFOPTIONS; 

The FILEPDFOPTIONS structure provides information about loading PDF, PS, or EPS files in LEADTOOLS.

Members

uStructSize

Size of the structure. This must be set before passing this structure to any LEADTOOLS toolkit function.

bUseLibFonts

Flag that indicates whether to use the library installed fonts, or system fonts. Possible values are:

Value Meaning
TRUE Use the library installed fonts.
FALSE Use the system fonts.

nDisplayDepth *

Resulting bitmap pixel depth. Possible values are:

Value Meaning
0 Auto-detect. The resulting bitmap will have the same bits per pixel as the requested page in the source PDF file. Internally, the toolkit will use the bits per pixel value of the first image item found on the page. If the page does not have any image items, the result will be 24 bits per pixel. It is best to use this value only when the source file is a raster PDF.
1 1 bit per pixel in the resulting bitmap
4 4 bits per pixel in the resulting bitmap
8 8 bits per pixel in the resulting bitmap
24 24 bits per pixel in the resulting bitmap

nTextAlpha *

Flag that indicates which type of font anti-aliasing to use. Possible values are:

Value Meaning
1 Do not use font anti-aliasing.
2 Use 2-bit font anti-aliasing.
4 Use 4-bit font anti-aliasing.

nGraphicsAlpha *

Flag that indicates which type of graphics anti-aliasing to use. Possible values are:

Value Meaning
1 Do not use graphics anti-aliasing.
2 Use 2-bit graphics anti-aliasing.
4 Use 4-bit graphics anti-aliasing.

szPassword *

String that contains the user password. This is the password used with encrypted PDF files.

uFlags *

Flags for PDF or PostScript files. Possible values are:

Value Meaning
PDF_DISABLE_CROPPING [0x00000001] Disable cropping for PostScript files.
PDF_DETECT_TEXT_DECORATION [0x00000002] - Automatically detect whether lines are text decorations (underline or strikethrough). This is only used for PDF-to-SVG conversion or for operations that use the PDF-to-SVG conversion internally (such as the Document Converter).
PDF_ENHANCE_THIN_LINES [0x00000004] Enhance thin lines.
PDF_DISABLE_CIECOLORS [0x00000010] Disable using CIE colors (both PDF and PostScript files).
PDF_ENABLE_INTERPOLATE [0x00000100] Enable interpolation for PDF files.
PDF_HIDE_NOAP_ANNOTATIONS [0x00010000] (Deprecated.) Hide annotation objects that have no appearance streams. If this flag is not set, all annotation objects will be loaded (both objects which have appearance streams and objects which do not have appearance streams).
PDF_HIDE_ALL_ANNOTATIONS [0x00100000] (Deprecated - use PDF_HIDE_ANNOTATIONS instead) Hide all annotation objects, both objects which have appearance streams and those which do not have appearance streams.
PDF_HIDE_ANNOTATIONS [0x00100000] Hide annotation objects.
PDF_HIDE_FORMFIELDS [0x00400000] Hide form fields.
PDF_HIDE_DIGITALSIGNATURES [0x00800000] Hide digital signatures.
PDF_DROP_IMAGEOVERTEXT [0x01000000] If the PDF file is ImageOverText, drop the image. See the Image Over Text section below for more details.
PDF_LOAD_CORRUPTED [0x02000000] Enable loading PDF files with corrupted image data without throwing errors.
PDF_USE_PDFENGINE [0x00001000] Use the LtPdfEngine to load PDF files.

The default value for uFlags is PDF_DETECT_TEXT_DECORATION | PDF_ENHANCE_THIN_LINES.

Comments

pFILEPDFOPTIONS is a pointer to a FILEPDFOPTIONS structure.

Use L_SetPDFOptions and L_GetPDFOptions to set and get PDF, PS, and EPS file options.

PDF, PS, and EPS files have no physical width or height in pixels. Use RASTERIZEDOCOPTIONS to control how the final document is rendered as a raster image. For more information, refer to RASTERIZEDOCOPTIONS.

Aliasing

The nTextAlpha and nGraphicsAlpha parameters specify which type of graphics anti-aliasing to use.

The structure is used by:


Image Over Text

Image over text (or overlay) is used when creating a searchable PDF document that is required to look the same as the original. When overlay is used, the PDF creator uses a raster image of the original file and saves it over the entire PDF page as an overlay. When opening the resulting document in a PDF viewer, it is possible to search the text underneath the overlay image and still maintain the look of the original document.

When loading a page from a PDF document that was created with this feature, LEADTOOLS will automatically render the overlay raster image on top of all other content of the page.

If rendering the overlay raster image on top of all other content of the page is not desired, set the PDF_DROP_IMAGEOVERTEXT flag in uFlags.

PDF_DROP_IMAGEOVERTEXT has no effect on pages that do not have an overlay.

Refer to DOCWRTPDFOPTIONS.bImageOverText for instructions for creating PDF documents with an overlay in LEADTOOLS.

* This option affects the PDF format when PDF_USE_PDFENGINE is set to use the LtPdfUtl.dll. It also affects the PostScript format.

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

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.