FixedImageSize

Represents a fixed image size.

public class FixedImageSize : ImageSize
Public Class FixedImageSize
    Inherits ImageSize

Inheritance: ObjectImageSizeFixedImageSize

Licensing Info

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

Examples

This example demonstrates how to rasterize a PDF document to a fixed image size.

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 FixedImageSize object.
        Dim fixedImageSize As FixedImageSize = New FixedImageSize(500.0F, 500.0F)

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

    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 FixedImageSize object.
        FixedImageSize fixedImageSize = new FixedImageSize(500.0f, 500.0f);

        // Save the image.
        rasterizer.Draw("Output.jpg", jpegImageFormat, fixedImageSize);
    }
}

Constructors

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

Properties

HeightGets or sets height of the image.
HorizontalDpiGets or sets horizontal DPI of the image.
UnitTypeGets or sets unit type of the image.
VerticalDpiGets or sets vertical DPI of the image.
WidthGets or sets width of the image.

Methods

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

ceTe.DynamicPDF.Rasterizer

In this topic