Docotic.Pdf Library Help > Samples > Draw and print PDF > Save PDF as multipage TIFF

This sample shows how to save a PDF document as multipage TIFF image.

Use PdfDocument.SaveAsTiff method with specific PdfDrawOptions. To create PdfDrawOptions use PdfDrawOptions.Create() method. You can fine-tune options after creation.

Saving of PDF as TIFF is not supported in the version for .NET Standard.

C#
using System.Diagnostics;

using BitMiracle.Docotic.Pdf;

namespace BitMiracle.Docotic.Pdf.Samples
{
    public static class SaveAsTiff
    {
        public static void Main()
        {
            // NOTE: 
            // When used in trial mode, the library imposes some restrictions.
            // Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx
            // for more information.

            string outputPath = "SaveAsTiff.tiff";

            using (var pdf = new PdfDocument(@"Sample Data\jfif3.pdf"))
            {
                PdfDrawOptions options = PdfDrawOptions.Create();
                options.BackgroundColor = new PdfRgbColor(255, 255, 255);

                pdf.SaveAsTiff(outputPath, options);
            }

            Process.Start(outputPath);
        }
    }
}
VB
Imports System.Diagnostics

Imports BitMiracle.Docotic.Pdf

Namespace BitMiracle.Docotic.Pdf.Samples
    Public NotInheritable Class SaveAsTiff
        Public Shared Sub Main()
            ' NOTE: 
            ' When used in trial mode, the library imposes some restrictions.
            ' Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx
            ' for more information.

            Dim outputPath As String = "SaveAsTiff.tiff"

            Using pdf = New PdfDocument("Sample Data\jfif3.pdf")
                Dim options As PdfDrawOptions = PdfDrawOptions.Create()
                options.BackgroundColor = New PdfRgbColor(255, 255, 255)

                pdf.SaveAsTiff(outputPath, options)
            End Using

            Process.Start(outputPath)
        End Sub
    End Class
End Namespace