DOCWRTOPTIONS

Summary

The DOCWRTOPTIONS structure provides structure size information for each document format.

Syntax

typedef struct _DOCWRTOPTIONS 
{ 
   L_UINT uStructSize; 
   DOCWRTPAGERESTRICTION PageRestriction; 
   L_DOUBLE dEmptyPageWidth; 
   L_DOUBLE dEmptyPageHeight; 
   L_INT nEmptyPageResolution; 
   L_BOOL bMaintainAspectRatio; 
   L_INT nDocumentResolution; 
} DOCWRTOPTIONS, *pDOCWRTOPTIONS; 

Members

uStructSize

Size of format option structure in bytes for versioning. Use the sizeof() to calculate this value.

PageRestriction

Value that indicates the possible page restrictions modes. Possible value are:

Value Meaning
DOCWRTPAGERESTRICTION_DEFAULT [0] Default page restriction, requires emf handle to create document.
DOCWRTPAGERESTRICTION_RELAXED [1] Relaxed page restrictions, emf handle is not mandatory to create document.

dEmptyPageWidth

The width of empty page, in inches. Default value is 8.5.

dEmptyPageHeight

The Height of empty page , in inches. Default value is 11.

nEmptyPageResolution

The document resolution for empty pages expressed in dots per inch. Default value is 0 (use the current screen resolution)

bMaintainAspectRatio

Flag that indicates whether to maintain the aspect ratio of the original emf file. Possible values are:

Value Meaning
TRUE Maintain the aspect ratio of the original file.
FALSE Do not maintain the aspect ratio.

nDocumentResolution

The document resolution expressed in dots per inch. Default value is 0 (use the resolution of the actual page).

Comments

pDOCWRTOPTIONS is a pointer to DOCWRTOPTIONS structure. Generally, where a function parameter type is pDOCWRTOPTIONS, you can declare a DOCWRTOPTIONS variable, update the structure's fields, and pass the variable's address in the parameter.

The default mode requires a valid EMF handle in order to create a document and thus does not support creating empty pages. Also, if the document supports overlay images (for example, PDF with the pOverlayBitmap and bImageOverText is true at DOCWRTPDFOPTIONS and an overlay image is not present) then an overlay image must be present in the page.

Relaxed mode does not require an EMF handle and thus supports creating a document with empty pages. Also, if the document supports overlay images (for example, PDF with the pOverlayBitmap and bImageOverText parameters true at DOCWRTPDFOPTIONS and the pOverlayBitmap is not present) then no overlay is automatically assumed and the page will be created successfully (for that case if the page DOCWRTPAGE has valid emf then a regular page will be created accordingly if DOCWRTPAGE has neither emf nor overlay image - both are NULL-, then an empty page will be created.

For Pdf format only if no emf handle is supported at DOCWRTPAGE but valid pOverlayBitmap, then a document with raster image will be created (i.e. with the overlay image), for other formats empty page will be created.

If bMaintainAspectRatio is true, then map this value to the higher resolution of the original emf file and calculate the other resolution in a way that maintains aspect ratio.

Declaring a pDOCWRTOPTIONS variable is necessary only if your program requires a pointer. The uStructSize should be set according to the size of document format options structure. The uStructSize is the total size, in bytes, for the one of the following structures:

DOCWRTLTDOPTIONS /*LEAD format options */ 
DOCWRTEMFOPTIONS /*EMF format options */ 
DOCWRTTXTOPTIONS /*Text format options */ 
DOCWRTPDFOPTIONS /*Pdf format options */ 
DOCWRTDOCOPTIONS /*Doc format options */ 
DOCWRTRTFOPTIONS /*Rtf format options */ 
DOCWRTHTMOPTIONS /*Html format options */ 
DOCWRTXPSOPTIONS /*XPS format options */ 
DOCWRTDOCXOPTIONS /*Docx format options */ 
DOCWRTXLSOPTIONS /*XLS format options */ 

Usage

Data Types

Functions

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

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