Skip to main content

PdfRasterizer

Version: 1.0

cete.dynamicpdf.rasterizer.pdfrasterizer

PdfRasterizer​

Represents a PDF rasterizer.

public class PdfRasterizer
Public Class PdfRasterizer

Inheritance: Object → PdfRasterizer

Examples​

This example demonstrates how to rasterize a PDF document.

Imports System
Imports ceTe.DynamicPDF.Rasterizer

Module MyModule

Sub Main()

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

' Save the image.
rasterizer.DrawToMultiPageTiff("Output.tif", TiffImageFormat.TiffWithLzw, ImageSize.Dpi72)

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");

// Save the image.
rasterizer.DrawToMultiPageTiff("Output.tif", TiffImageFormat.TiffWithLzw, ImageSize.Dpi72);
}
}

Constructors​

PdfRasterizer(InputPdf)​

Initializes a new instance of the PdfRasterizer class.

public PdfRasterizer(InputPdf inputPdf)
Public Sub New (inputPdf As InputPdf)

Parameters​

Represents an input PDF to rasterize.

PdfRasterizer(InputPdf, Int32, Int32)​

Initializes a new instance of the PdfRasterizer class.

public PdfRasterizer(InputPdf inputPdf, int startPageNumber, int pageCount)
Public Sub New (inputPdf As InputPdf, startPageNumber As Integer, pageCount As Integer)

Parameters​

Represents an input PDF to rasterize.

Starting page number of the PDF to rasterize.

Total page count of the PDF to rasterize.

PdfRasterizer(String)​

Initializes a new instance of the PdfRasterizer class.

public PdfRasterizer(string filePath)
Public Sub New (filePath As String)

Parameters​

Physical file path of the PDF to rasterize.

PdfRasterizer(String, Int32, Int32)​

Initializes a new instance of the PdfRasterizer class.

public PdfRasterizer(string filePath, int startPageNumber, int pageCount)
Public Sub New (filePath As String, startPageNumber As Integer, pageCount As Integer)

Parameters​

Physical file path of the PDF to rasterize.

Starting page number of the PDF to rasterize.

Total page count of the PDF to rasterize.

Properties​

Pages​

Gets the PdfRasterizerPageList containing the pages to rasterize.

public PdfRasterizerPageList Pages { get; }
Public Property Pages As PdfRasterizerPageList

Property Value​

PdfRasterizerPageList

Methods​

AddLicense(String)​

Adds a license key.

public static bool AddLicense(string licenseKey)
Shared Function AddLicense(licenseKey As String) As Boolean

Parameters​

The license key to add.

Returns​

A boolean value indicating if the license is valid.

Remarks​

This method accepts a license key, not a serial number.

Append(InputPdf)​

Append the entire PDF document to the list of pages to rasterize.

public void Append(InputPdf inputPdf)
Sub Append(inputPdf As InputPdf)

Parameters​

Represents an input PDF to rasterize.

Append(InputPdf, Int32, Int32)​

Append the entire the pages of the pdf document to the PdfRasterizerPageList.

public void Append(InputPdf inputPdf, int startPageNumber, int pageCount)
Sub Append(inputPdf As InputPdf, startPageNumber As Integer, pageCount As Integer)

Parameters​

Represents an input PDF to rasterize.

Starting page number of the PDF to rasterize.

Total page count of the PDF to rasterize.

Append(String)​

Append the entire PDF document to the list of pages to rasterize.

public void Append(string filePath)
Sub Append(filePath As String)

Parameters​

Physical file path of the PDF to rasterize.

Append(String, Int32, Int32)​

Append the entire PDF document to the list of pages to rasterize.

public void Append(string filePath, int startPageNumber, int pageCount)
Sub Append(filePath As String, startPageNumber As Integer, pageCount As Integer)

Parameters​

Physical file path of the Pdf

Starting page number of the PDF to rasterize.

Total page count of the PDF to rasterize.

Draw(ImageFormat, ImageSize)​

Rasterizes all pages in the page list to an array of byte arrays containing the image data.

public Byte[][] Draw(ImageFormat imageFormat, ImageSize imageSize)
Function Draw(imageFormat As ImageFormat, imageSize As ImageSize) As Byte[][]

Parameters​

Represents the image format to use.

Represents image size to use.

Returns​

Returns the array of byte arrays containing the image data.

Draw(String, ImageFormat, ImageSize)​

Rasterizes all pages in the page list to an image and stores the image to the given filename.

public void Draw(string fileName, ImageFormat imageFormat, ImageSize imageSize)
Sub Draw(fileName As String, imageFormat As ImageFormat, imageSize As ImageSize)

Parameters​

Pysical file path of the image.

Represents the image format to use.

Represents image size to use.

DrawToMultiPageTiff(Stream, TiffImageFormat, ImageSize)​

Rasterizes all pages in the page list to an multi-page TIFF image and stores it to the given stream.

public void DrawToMultiPageTiff(Stream stream, TiffImageFormat tiffImageFormat, ImageSize imageSize)
Sub DrawToMultiPageTiff(stream As Stream, tiffImageFormat As TiffImageFormat, imageSize As ImageSize)

Parameters​

Stream containing the Pdf data.

Represents the TIFF image format to use.

Represents image size to use.

DrawToMultiPageTiff(String, TiffImageFormat, ImageSize)​

Rasterizes all pages in the page list to an multi-page TIFF image and stores it to the given filename.

public void DrawToMultiPageTiff(string fileName, TiffImageFormat tiffImageFormat, ImageSize imageSize)
Sub DrawToMultiPageTiff(fileName As String, tiffImageFormat As TiffImageFormat, imageSize As ImageSize)

Parameters​

Pysical filepath of the image.

Represents the TIFF image format to use.

Represents image size to use.

DrawToMultiPageTiff(TiffImageFormat, ImageSize)​

Rasterizes all pages in the page list to an multi-page TIFF image and returns it as a byte array.

public Byte[] DrawToMultiPageTiff(TiffImageFormat tiffImageFormat, ImageSize imageSize)
Function DrawToMultiPageTiff(tiffImageFormat As TiffImageFormat, imageSize As ImageSize) As Byte()

Parameters​

Represents the TIFF image format to use.

Represents image size to use.

Returns​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

See Also​

ceTe.DynamicPDF.Rasterizer