cete.dynamicpdf.rasterizer.inputpdf
InputPdf
- Namespace: ceTe.DynamicPDF.Rasterizer
- Assemblies: ceTe.DynamicPDF.Rasterizer.dll
Represents an input PDF.
public class InputPdf : IDisposable
Public Class InputPdf
Implements IDisposable
Inheritance: Object → InputPdf
Implements: IDisposable
Examples
This example demonstrates how to rasterize a PDF document to JPEG.
Imports System
Imports ceTe.DynamicPDF.Rasterizer
Module MyModule
Sub Main()
' Create a InputPdf object.
Dim input As InputPdf = New InputPdf("InputPdfFile.pdf")
' Create a PdfRasterizer object.
Dim rasterizer As PdfRasterizer = New PdfRasterizer(input)
' Create a JpegImageFormat object.
Dim jpegImageFormat As JpegImageFormat = New JpegImageFormat(80)
' Save the image.
rasterizer.Draw("Output.jpg", jpegImageFormat, ImageSize.Dpi72)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Rasterizer;
class MyClass
{
static void Main(string[] args)
{
// Create a InputPdf object.
InputPdf input = new InputPdf("InputPdfFile.pdf");
// Create a PdfRasterizer object.
PdfRasterizer rasterizer = new PdfRasterizer(input);
// Create a JpegImageFormat object.
JpegImageFormat jpegImageFormat = new JpegImageFormat(80);
// Save the image.
rasterizer.Draw("Output.jpg", jpegImageFormat,ImageSize.Dpi72);
}
}
Constructors
InputPdf(Byte[])
Initializes a new instance of the InputPdf class.
public InputPdf(Byte[] pdfData)
Public Sub New (pdfData As Byte())
Parameters
- pdfData: Byte[]
Byte array of the input PDF data.
InputPdf(Byte[], String)
Initializes a new instance of the InputPdf class.
public InputPdf(Byte[] pdfData, string password)
Public Sub New (pdfData As Byte(), password As String)
Parameters
- pdfData: Byte[]
Byte array of the input PDF data.
- password: String
Password to open the PDF file.
InputPdf(Stream)
Initializes a new instance of the InputPdf class.
public InputPdf(Stream stream)
Public Sub New (stream As Stream)
Parameters
- stream: Stream
Stream containing the PDF data.
InputPdf(Stream, String)
Initializes a new instance of the InputPdf class.
public InputPdf(Stream stream, string password)
Public Sub New (stream As Stream, password As String)
Parameters
- stream: Stream
Stream containing the PDF data.
- password: String
Password to open the PDF file.
InputPdf(String)
Initializes a new instance of the InputPdf class.
public InputPdf(string fileName)
Public Sub New (fileName As String)
Parameters
- fileName: String
Physical file path of the PDF.
InputPdf(String, String)
Initializes a new instance of the InputPdf class.
public InputPdf(string fileName, string password)
Public Sub New (fileName As String, password As String)
Parameters
- fileName: String
Physical file path of the PDF.
- password: String
Password to open the PDF file.
Properties
Pages
Gets the InputPdfPageList containing the pages of the input PDF.
public InputPdfPageList Pages { get; }
Public Property Pages As InputPdfPageList
Property Value
Methods
Dispose()
public void Dispose()
Sub Dispose()
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
- obj: Object
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 .