Saves whole PDF document into multipage TIFF file

Namespace:  SautinSoft
Assembly:  SautinSoft.PdfFocus (in SautinSoft.PdfFocus.dll) Version: 6.6.9.7 (6.6.9.7)

Syntax

      
 C#  Visual Basic 
public int ToMultipageTiff(
	string fileName
)
Public Function ToMultipageTiff ( _
	fileName As String _
) As Integer

Parameters

fileName
String
Path to multipage TIFF file

Return Value

0 - saving successfully
2 - can't create output file, check the output path
3 - saving failed, email to support@sautinsoft.com

Remarks

To start the process, please download the most fresh version of PDF Focus .Net.

Before converting you may set various image properties using the property ImageOptions. For example, set:
  • Dpi - image resolution in dots per inch. Default value: 120
  • ColorDepth - color depth or bit depth is the number of bits used to represent the color of a single pixel. Default value: 24 bit RGB


Examples

CopyHow to convert PDF file to Multipage TIFF file in C#
using System;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;

namespace Sample
{
    class Sample
    {
        static void Main(string[] args)
        {
            //Convert PDF file to Multipage TIFF file
            SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
            //this property is necessary only for registered version
            //f.Serial = "XXXXXXXXXXX";

            string pdfPath = @"..\..\..\..\..\simple text.pdf";
            string tiffPath = Path.ChangeExtension(pdfPath, ".tiff");

            f.OpenPdf(pdfPath);

            if (f.PageCount > 0)
            {
                f.ImageOptions.Dpi = 120;
                if (f.ToMultipageTiff(tiffPath) == 0)
                {
                    System.Diagnostics.Process.Start(tiffPath);
                }
            }            
        }
    }
}
CopyHow to convert PDF file to Multipage TIFF file in VB.Net
Imports System.IO
Imports System.Drawing.Imaging
Imports System.Collections.Generic
Imports SautinSoft

Module Sample

    Sub Main()
        'Convert PDF file to Multipage TIFF file
        Dim f As New SautinSoft.PdfFocus()
        'this property is necessary only for registered version
        'f.Serial = "XXXXXXXXXXX";


        Dim pdfPath As String = "..\..\..\..\simple text.pdf"
        Dim tiffPath As String = Path.ChangeExtension(pdfPath, ".tiff")

        f.OpenPdf(pdfPath)

        If f.PageCount > 0 Then
            f.ImageOptions.Dpi = 120
            If f.ToMultipageTiff(tiffPath) = 0 Then
                System.Diagnostics.Process.Start(tiffPath)
            End If
        End If
    End Sub
End Module

See Also