typedef struct _DOCWRTOPTIONS 
   L_UINT uStructSize; 
   L_DOUBLE dEmptyPageWidth; 
   L_DOUBLE dEmptyPageHeight; 
   L_INT nEmptyPageResolution 
   L_BOOL bMaintainAspectRatio 
   L_INT nDocumentResolution; 

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




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


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




[0] Default page restriction, requires emf handle to create document.


[1] Relaxed page restrictions, emf handle is not mandatory to create document.


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


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


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


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




Maintain the aspect ratio of the original file.


Do not maintain the aspect ratio.


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


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 */ 

This structure is used with the L_DocWriterInit function.

Help Version 20.0.2018.1.19
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help