PDF to TIFF - pqScan.com
ASP.NET PDF to TIFF/TIF Conversion How to Add and Use Mature PDF to TIFF/TIF Converter in Your ASP.NET Application Online Demo Download Trial Purchase Now
.NET C#.NET VB.NET
ASP.NET

How to Convert PDF to TIFF in ASP.NET?

back to home  >  .NET PDF to Image SDK  >  How to Convert PDF to Image in .NET  >  Free ASP.NET Example for PDF to TIFF

Do you have spent a lot of time in finding how to convert PDF document to TIFF or other image types in your ASP.NET program? If yes, this online tutorial may tell you how to do this.

As you may see, pqScan PDF to Image Converter for .NET provides pre-configured methods for effective online conversion between PDF document and image file formats, like TIFF/TIF. It can fulfill all your ASP.NET project programming requirements for PDF to TIFF/TIF image converting.

It's a very simple-in-use and energetic PDF component, which can be integrated into your ASP.NET web form application easily. All reliable PDF-to-TIFF transforming functions are compiled into a library file called "PQScan.PDFToImage.dll". Therefore, you may just need to add it into your Visual Studio project as reference and place the following sample codes into your web project (page load event), for both C# and VB.NET programming.

PDF to TIFF for ASP.NET -- C# Example

Our PDF to Image SDK can run in .NET Framework 2.0 or higher platform, compatible with C# programming language. This example demonstrates how to transform PDF document to TIFF image format in ASP.NET project for viewing online using C# language.

using System;
using System.Web.UI;
using System.IO;
using PQScan.PDFToImage;

public partial class _Default: System.Web.UI.Page 
{
  protected void Page_Load(object sender, EventArgs e)
  {
    // Prepare a sample PDF file.
    string pdfFileName = Server.MapPath("sample.pdf");

    // Create an instance of PQScan.PDFToImage.PDFDocument object.
    PDFDocument pdfDoc = new PDFDocument();

    // Load your sample PDF file.
    pdfDoc.LoadPDF(pdfFileName);

    // Prepare response.
    Response.Clear();
    Response.ContentType = "image/tiff";

    // Render the first page of your PDF file to the output image.
    System.Drawing.Image tifImage = pdfDoc.ToImage(0);

    using (MemoryStream ms = new MemoryStream())
    {
      // Save image as tif format.
      tifImage.Save(ms, System.Drawing.Imaging.ImageFormat.Tiff);

      // Show tif image to your aspx web page.
      Response.OutputStream.Write(ms.GetBuffer(), 0, (int)ms.Length);
    }

    tifImage.Dispose();

    Response.End();
  }
}

PDF to TIFF for ASP.NET -- VB Example

You can create your ASP.NET web form project in VB.NET and have a try with this PDF file to TIFF image conversion example.

Imports System
Imports System.Web.UI
Imports System.IO
Imports PQScan.PDFToImage
 
Public partial Class _Default
     Inherits System.Web.UI.Page
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
    ' Prepare a sample PDF document.
    Dim pdfFileName As String = Server.MapPath("sample.pdf") 
 
    ' Create an instance of PQScan.PDFToImage.PDFDocument object.
    Dim pdfDoc As PDFDocument = New PDFDocument() 
 
    ' Load your sample PDF document.
    pdfDoc.LoadPDF(pdfFileName)
 
    ' Prepare response.
    Response.Clear()
    Response.ContentType = "image/tiff"
 
    ' Render the first page of your PDF document to the output image.
    Dim tifImage As System.Drawing.Image = pdfDoc.ToImage(0) 
 
    Imports (MemoryStream ms = New MemoryStream())
    {
      ' Save image as tif format.
      tifImage.Save(ms, System.Drawing.Imaging.ImageFormat.Tiff)
 
      ' Display tif image to your aspx web page to view.
      Response.OutputStream.Write(ms.GetBuffer(), 0, CType(ms.Length, Integer))
    }
 
    tifImage.Dispose()
 
    Response.End()
  End Sub
End Class

convert pdf to tif in asp.net

pqScan SDK
.NET PDF to Image Library
Online Guide
PDF to Image Conversion in .NET
Conversion Type
Changing PDF to JPEG in VB.NET Changing PDF to BMP in VB.NET Changing PDF to GIF in VB.NET Changing PDF to Multi-page TIFF in C# Changing PDF to GIF in C# Changing PDF to Multi-page TIFF in .NET Changing PDF to JPEG in ASP.NET View All Image Types >>
Recently, i move from a competitor product to pqScan, and I want to say it's really an intellectual choice. Through testing, I realize how much better pqScan is. I'm very glad I made the switch! So, I advise you to use it. Arlen Khan