TiffFile
Represents a TIFF image file.
public class TiffFile
Public Class TiffFile
Inheritance: ObjectTiffFile
Licensing Info
This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
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")
' Close the image stream object
myTiffFile.Close()
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Imaging;
public class Example
{
public static void CreatePDF(string inputTiffFilePath, string outputPath)
{
// Create a TiffFile object from the TIFF image
TiffFile tiffFile = new TiffFile( inputTiffFilePath );
// Create a document object from the file
Document document = tiffFile.GetDocument();
// Save the PDF document
document.Draw( outputPath );
// Close the image stream object
tiffFile.Close();
}
}
Remarks
See the TIFF Images section for more details on TIFF File.
1. For handling TIFF files, always use TiffFile object class. 2. When using TiffFile object, always call the Close() method after draw method because internally the image stream will not be closed.Constructors
TiffFile(Byte[]) | Initializes a new instance of the TiffFile class. |
TiffFile(Stream) | Initializes a new instance of the TiffFile class. |
TiffFile(String) | Initializes a new instance of the TiffFile class. |
Properties
FirstImage | Returns the first image in the TIFF file. |
Images | Returns a collection of images in the TIFF file. |
Methods
Close() | Closes the stream associated with this object. |
Equals(Object) | Determines whether the specified Object is equal to the current Object . (Inherited from Object) |
GetDocument() | Creates a Document object that contains the images of the tiff file. |
GetHashCode() | Serves as a hash function for a particular type. (Inherited from Object) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
IsValid(Byte[]) | Returns a value indicating if the provides file header is valid for a TIFF image. |
IsValid(String) | Returns a value indicating if the provides file extension is valid for a TIFF image. |
ToString() | Returns a String that represents the current Object . (Inherited from Object) |