cete.dynamicpdf.imaging.tifffile
TiffFile
- Namespace: ceTe.DynamicPDF.Imaging
- Assemblies: ceTe.DynamicPDF.40.dll
Represents a TIFF image file.
public class TiffFile
Public Class TiffFile
Inheritance: Object → TiffFile
Licensing
This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:
- DynamicPDF Generator for .NET Professional Edition
- DynamicPDF Generator for .NET Enterprise Edition
- DynamicPDF Merger for .NET Professional Edition
- DynamicPDF Merger for .NET Enterprise Edition
- DynamicPDF ReportWriter for .NET Professional Edition
- DynamicPDF ReportWriter for .NET Enterprise Edition
- DynamicPDF Core Suite for .NET Professional Edition
- DynamicPDF Core Suite for .NET Enterprise Edition
Examples
This example shows how to create a PDF out of a Tiff image.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Imaging
Module MyModule Sub Main() ' Create a TiffFile object from the TIFF image Dim myTiffFile As TiffFile = New TiffFile("C:\MyMultipageTiff.tif") ' Create a document object from the file Dim MyDocument As Document = myTiffFile.GetDocument() ' Save the PDF document MyDocument.Draw("C:\MyDocument.pdf") End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Imaging;
class MyClass
{static void Main(){ // Create a TiffFile object from the TIFF image TiffFile tiffFile = new TiffFile( @"C:\MyMultipageTiff.tif" ); // Create a document object from the file Document document = tiffFile.GetDocument(); // Save the PDF document document.Draw( @"C:\MyDocument.pdf" );}
}
Remarks
See the Tiff Images section for more details on TiffFile.
Constructors
TiffFile(Byte[])
Initializes a new instance of the TiffFile class.
public TiffFile(Byte[] data)
Public Sub New (data As Byte())
Parameters
- data: Byte[]
Byte array containing the TIFF file.
TiffFile(Stream)
Initializes a new instance of the TiffFile class.
public TiffFile(Stream stream)
Public Sub New (stream As Stream)
Parameters
- stream: Stream
Stream object containing the TIFF file.
TiffFile(String)
Initializes a new instance of the TiffFile class.
public TiffFile(string filePath)
Public Sub New (filePath As String)
Parameters
- filePath: String
The physical file path of the TIFF.
Properties
FirstImage
Returns the first image in the TIFF file.
public TiffImageData FirstImage { get; }
Public Property FirstImage As TiffImageData
Property Value
Images
Returns a collection of images in the TIFF file.
public TiffImageDataList Images { get; }
Public Property Images As TiffImageDataList
Property Value
Methods
Close()
Closes the stream associated with this object.
public void Close()
Sub Close()
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.
GetDocument()
Creates a Document object that contains the images of the tiff file.
public Document GetDocument()
Function GetDocument() As Document
Returns
A Document object.
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.
IsValid(Byte[])
Returns a value indicating if the provides file header is valid for a TIFF image.
public static bool IsValid(Byte[] header)
Shared Function IsValid(header As Byte()) As Boolean
Parameters
- header: Byte[]
Returns
IsValid(String)
Returns a value indicating if the provides file extension is valid for a TIFF image.
public static bool IsValid(string fileExtension)
Shared Function IsValid(fileExtension As String) As Boolean
Parameters
- fileExtension: String
Returns
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 .