Represents a maximum image size.

public class MaxImageSize : ImageSize
Public Class MaxImageSize
    Inherits ImageSize

Inheritance: ObjectImageSizeMaxImageSize

Licensing Info

This class is a DynamicPDF Rasterizer feature. One of the following is required for non-evaluation usage:


This example demonstrates how to rasterize a PDF document to the maximum size while maintaining its aspect ratio.

Imports System
Imports ceTe.DynamicPDF.Rasterizer

Module MyModule

    Sub Main()

        ' Create a PdfRasterizer object.
        Dim rasterizer As PdfRasterizer = New PdfRasterizer("InputPdfFile.pdf")

        ' Create a JpegImageFormat object.
        Dim jpegImageFormat As JpegImageFormat = New JpegImageFormat(90)

        ' Create a MaxImageSize object.
        Dim maxImageSize As MaxImageSize = New MaxImageSize(800.0F, 400.0F)

        ' Save the image.
        rasterizer.Draw("Output.jpg", jpegImageFormat, maxImageSize)

    End Sub
End Module
using System;
using ceTe.DynamicPDF.Rasterizer;

class MyClass
    static void Main(string[] args)
        // Create a PdfRasterizer object
        PdfRasterizer rasterizer = new PdfRasterizer("InputPdfFile.pdf");
        // Create a JpegImageFormat object.
        JpegImageFormat jpegImageFormat =  new JpegImageFormat(90);
        // Create a MaxImageSize object.
        MaxImageSize maxImageSize = new MaxImageSize(800.0f, 400.0f);

        // Save the image.


Maintains the aspect ratio of the image.


MaxImageSize(Single, Single)Initializes a new instance of the MaxImageSize class.
MaxImageSize(Single, Single, Single, Single, UnitType)Initializes a new instance of the MaxImageSize class.
MaxImageSize(Single, Single, UnitType)Initializes a new instance of the MaxImageSize class.


HorizontalDpiGets or sets horizontal DPI of the image.
MaxHeightGets or sets maximum height of the image.
MaxWidthGets or sets maximum width of the image.
VerticalDpiGets or sets vertical DPI of the image.


Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also


In this topic