DOCWRTOPTIONS

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;

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

Member

Description

uStructSize

Size of this 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] Require emf handle to create document.

DOCWRTPAGERESTRICTION_RELAXED

[1] 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.

DocumentResolution

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 no overlayimage -both are NULL-, then an empy 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 */

This structure is used with the L_DocWriterInit function.