How to Convert PDF Pages to TIFF Image inside .NET Applications
This technical tip shows how to convert PDF pages to TIFF image inside .NET Applications. The TiffDevice class allows you to convert PDF pages to TIFF images. This class provides a method named Process which allows you to convert all the pages in a PDF file to a single TIFF image. To convert a particular page in a PDF file to a TIFF image, use an overloaded version of the Process(..) method which takes a page number as an argument for conversion.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//your code here...//The following code snippet shows how to convert all the PDF pages to a single TIFF image.
//[C# Code Sample]
// Open document
Document pdfDocument = new Document("input.pdf");
// Create Resolution object
Resolution resolution = new Resolution(300);
// Create TiffSettings object
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.Compression = CompressionType.None;
tiffSettings.Depth = ColorDepth.Default;
tiffSettings.Shape = ShapeType.Landscape;
tiffSettings.SkipBlankPages = false;
// Create TIFF device
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);
// Convert a particular page and save the image to stream
tiffDevice.Process(pdfDocument, "output.tif");
//[VB.NET Code Sample]
'Open document
Dim pdfDocument As New Document("input.pdf")
'Create Resolution object
Dim resolution As New Resolution(300)
'Create TiffSettings object
Dim tiffSettings As New TiffSettings()
tiffSettings.Compression = CompressionType.None
tiffSettings.Depth = ColorDepth.Default
tiffSettings.Shape = ShapeType.Landscape
tiffSettings.SkipBlankPages = False
'Create TIFF device
Dim tiffDevice As New TiffDevice(resolution, tiffSettings)
'Convert a particular page and save the image to stream
tiffDevice.Process(pdfDocument, "output.tif")
//Convert One Page to TIFF Image
X
Url: http://www.aspose.com/.net/pdf-component.aspx
Language: C# | User: Sheraz Khan | Created: Jun 22, 2016 | Tags: Convert PDF Pages to TIFF Image Convert All Pages to One TIFF Image Convert One Page to TIFF Image convert first page of a PDF to TIFF .NET PDF API