Leadtools.Codecs Namespace : CodecsRasterizeDocumentSizeMode Enumeration |
public enum CodecsRasterizeDocumentSizeMode : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
'Declaration Public Enum CodecsRasterizeDocumentSizeMode Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
'Usage Dim instance As CodecsRasterizeDocumentSizeMode
public enum CodecsRasterizeDocumentSizeMode : System.IComparable, System.IConvertible, System.IFormattable
Leadtools.Codecs.CodecsRasterizeDocumentSizeMode = function() { }; Leadtools.Codecs.CodecsRasterizeDocumentSizeMode.prototype = {
LeadtoolsMemberMarker(replace me) };
public enum class CodecsRasterizeDocumentSizeMode : public System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Member | Description |
---|---|
Fit | Fit the resulting raster image into CodecsRasterizeDocumentLoadOptions.PageWidth and CodecsRasterizeDocumentLoadOptions.PageHeight while maintaining the aspect ratio. If the original document size is smaller than the requested page size, no transformation is performed. The final Leadtools.RasterImage will have a width or height equal to or less than the requested page width or height but not greater. |
FitAlways | Always fit the resulting raster image into CodecsRasterizeDocumentLoadOptions.PageWidth and CodecsRasterizeDocumentLoadOptions.PageHeight 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 Leadtools.RasterImage will have a width or height equal to the requested page width or height. Not less and not greater. |
FitWidth | Fit the resulting raster image width into CodecsRasterizeDocumentLoadOptions.PageWidth while maintaining the aspect ratio. The image height will be calculated based on the transformation and CodecsRasterizeDocumentLoadOptions.PageHeight is not used. The final Leadtools.RasterImage will have a width equal to the requested page width. The height depends on the original document height. |
None | Use the original document width and height. No transformation will be performed and CodecsRasterizeDocumentLoadOptions.PageWidth and CodecsRasterizeDocumentLoadOptions.PageHeight are not used. The final Leadtools.RasterImage will have a width or height value equals to the original document size. |
Stretch | The resulting raster image width and height will be exactly equal to CodecsRasterizeDocumentLoadOptions.PageWidth and CodecsRasterizeDocumentLoadOptions.PageHeight. Aspect ratio might be different than the original document. The final Leadtools.RasterImage will have a width and height equal to the requested page width and height. |
The CodecsRasterizeDocumentSizeMode enumeration type is used as the value for CodecsRasterizeDocumentLoadOptions.SizeMode property.
LEADTOOLS provides support for loading a document as a raster image. Document formats such as PDF, XPS, DOC/DOCX(2007/2010), PPT/PPTX(2007/2010), XLS/XLSX(2007/2010), RTF and Text do not contain physical width, height or resolution. It is up to the loader (in this case, the RasterCodecs object) to specify the transformation from logical coordinates to physical pixels through a process called rasterization. For more information, refer to CodecsRasterizeDocumentLoadOptions.
You can use the CodecsRasterizeDocumentLoadOptions.SizeMode property to control how to use CodecsRasterizeDocumentLoadOptions.PageWidth and CodecsRasterizeDocumentLoadOptions.PageHeight to control the final raster image size. LEADTOOLS will determine the original document size (a value that can be obtained in CodecsDocumentImageInfo.PageWidth and CodecsDocumentImageInfo.PageHeight and then apply the transformation from this value to determine the final Leadtools.RasterImage width and height.
System.Object
System.ValueType
System.Enum
Leadtools.Codecs.CodecsRasterizeDocumentSizeMode
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2