Skip to main content

ImageConverter

Version: 2.0

cete.dynamicpdf.conversion.imageconverter

ImageConverter​

  • Namespace: ceTe.DynamicPDF.Conversion
  • Assemblies: DynamicPDF.Converter.NETFramework40.dll, DynamicPDF.Converter.NETStandard20.dll

Converts Image to Pdf

public class ImageConverter
Public Class ImageConverter

Inheritance: Object → ImageConverter

Constructors​

ImageConverter(Byte[])​

Creates an instance of the ImageConverter class.

public ImageConverter(Byte[] imageData)
Public Sub New (imageData As Byte())

Parameters​

Image data in byte array format

ImageConverter(Byte[], ImageConversionOptions)​

Creates an instance of the ImageConverter class.

public ImageConverter(Byte[] imageData, ImageConversionOptions conversionOptions)
Public Sub New (imageData As Byte(), conversionOptions As ImageConversionOptions)

Parameters​

Image data in byte array format

Initializes the ConversionOptions property of the class.

ImageConverter(String)​

Creates an instance of the ImageConverter class.

public ImageConverter(string inputFilePath)
Public Sub New (inputFilePath As String)

Parameters​

Path where the image is located

ImageConverter(String, ImageConversionOptions)​

Creates an instance of the ImageConverter class.

public ImageConverter(string inputFilePath, ImageConversionOptions conversionOptions)
Public Sub New (inputFilePath As String, conversionOptions As ImageConversionOptions)

Parameters​

Path where the image is located

Initializes the ConversionOptions property of the class.

Properties​

ConversionOptions​

Gets the instance of the ImageConversionOptions class

public ImageConversionOptions ConversionOptions { get; }
Public Property ConversionOptions As ImageConversionOptions

Property Value​

ImageConversionOptions

Methods​

AbortConversion()​

Aborts the Asynchronous conversion

public void AbortConversion()
Sub AbortConversion()

Convert()​

Converts Image to Pdf

public Byte[] Convert()
Function Convert() As Byte()

Returns​

output pdf in byte array format

Convert(Byte[])​

Converts Image to Pdf

public Byte[] Convert(Byte[] pdfToAppendTo)
Function Convert(pdfToAppendTo As Byte()) As Byte()

Parameters​

Contents of Pdf in byte array format, to which the current conversion needs to be appended to

Returns​

output pdf in byte array format

Convert(String)​

Converts Image to Pdf

public void Convert(string outputFilePath)
Sub Convert(outputFilePath As String)

Parameters​

Path where the output file needs to be saved

ConvertAsync()​

Does the Asynchronous conversion

public void ConvertAsync()
Sub ConvertAsync()

ConvertAsync(Byte[])​

Does the Asynchronous conversion

public void ConvertAsync(Byte[] pdfToAppendTo)
Sub ConvertAsync(pdfToAppendTo As Byte())

Parameters​

Contents of Pdf in byte array format, to which the current conversion needs to be appended to

ConvertAsync(String)​

Does the Asynchronous conversion

public void ConvertAsync(string outputFilePath)
Sub ConvertAsync(outputFilePath As String)

Parameters​

Path where the output file needs to be saved

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 .

Events​

Completed​

Occurs when a document is successfully converted.

public event ConversionCompleted ImageConverter.Completed;
Public Event ImageConverter.Completed As ConversionCompleted

Event Handler​

ConversionCompleted

ProgressChanged​

Occurs when the status of a document conversion changes.

public event ProgressChanged ImageConverter.ProgressChanged;
Public Event ImageConverter.ProgressChanged As ProgressChanged

Event Handler​

ProgressChanged

See Also​

ceTe.DynamicPDF.Conversion