RASTERIZEDOC_SIZEMODE - Raster imaging C++ Class Library Help

RASTERIZEDOC_SIZEMODE

typedef enum 
{ 
   RASTERIZEDOC_SIZEMODE_NONE, 
   RASTERIZEDOC_SIZEMODE_FIT, 
   RASTERIZEDOC_SIZEMODE_FIT_ALWAYS, 
   RASTERIZEDOC_SIZEMODE_FIT_WIDTH, 
   RASTERIZEDOC_SIZEMODE_STRETCH 
} RASTERIZEDOC_SIZEMODE; 

The RASTERIZEDOC_SIZEMODE enumeration specifies the transformation to be used when converting the logical size specified in the current document rasterization options to the final physical raster image size.

Member

Description

RASTERIZEDOC_SIZEMODE_NONE

Use the original document width and height. No transformation will be performed and RASTERIZEDOCOPTIONS.dPageWidth and RASTERIZEDOCOPTIONS.dPageHeight are not used.

 

The final BITMAPHANDLE will have a width or height value equals to the original document size.

RASTERIZEDOC_SIZEMODE_FIT

Fit the result raster image into RASTERIZEDOCOPTIONS.dPageWidth and RASTERIZEDOCOPTIONS.dPageHeigh while maintaining the aspect ratio. If the original document size is smaller than the requested page size, no transformation is performed.

 

The final BITMAPHANDLE will have a width or height equal to or less than the requested page width or height but not greater.

RASTERIZEDOC_SIZEMODE_FIT_ALWAYS

Always fit the result raster image into RASTERIZEDOCOPTIONS.dPageWidth and RASTERIZEDOCOPTIONS.dPageHeight while maintaining the aspect ratio. If the original document size is smaller than the requested page size, then the result image is scaled up.

 

The final BITMAPHANDLE will have a width or height equal to the requested page width or height. Not less and not greater.

RASTERIZEDOC_SIZEMODE_FIT_WIDTH

Fit the result raster image width into RASTERIZEDOCOPTIONS.dPageWidth while maintaining the aspect ratio. The image height will be calculated based on the transformation and RASTERIZEDOCOPTIONS.dPageHeight is not used.

 

The final BITMAPHANDLE will have a width equal to the requested page width. The height depends on the original document height.

RASTERIZEDOC_SIZEMODE_STRETCH

The resulting raster image width and height will be exactly equal to RASTERIZEDOCOPTIONS.dPageWidth and RASTERIZEDOCOPTIONS.dPageHeight. Aspect ratio might be different than the original document.

 

The final BITMAPHANDLE will have a width and height equal to the requested page width and height.

Comments

The RASTERIZEDOC_SIZEMODE enumeration type is used as the value for RASTERIZEDOCOPTIONS.uSizeMode member.

LEADTOOLS provides support for loading a document as a raster image. Document formats such as PDF, XPS, XLS, RTF and Text do not contain physical width, height or resolution. It is up to the loader to specify the transformation from logical coordinates to physical pixels through a process called rasterization. For more information, refer to RASTERIZEDOCOPTIONS.

You can use the RASTERIZEDOCOPTIONS.uSizeMode member to control how to use RASTERIZEDOCOPTIONS.dPageWidth and RASTERIZEDOCOPTIONS.dPageHeight to control the final raster image size. LEADTOOLS will determine the original document size (a value that can be obtained in FILEINFO.dDocPageWidth and FILEINFO.dDocPageHeight and then apply the transformation from this value to determine the final width and height.

Help Version 20.0.2018.6.22
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help