PDF to GIF - pqScan.com
ASP.NET PDF to GIF Conversion High-end ASP.NET Software for Web Project PDF to GIF Converting and Viewing Online Demo Download Trial Purchase Now

How to Convert PDF to GIF in ASP.NET?

back to home  >  .NET PDF to Image SDK  >  How to Convert PDF to Image in .NET  >  How to Convert PDF to GIF for Online Viewing

We offer you a 100% clean and top-notch .NET library control for PDF document conversion, which can be integrated into your ASP.NET application rapidly. This library control is called pqScan .NET PDF to Image SDK. By using it, there's no difficulty to change and transform PDF document to GIF image file in your web project. Used independently, without needing the help of any Adobe PDF reader software.

Our software is compatible with all .NET programming languages, like C#.NET and VB.NET. And it supports all Operating System where .NET Framework 2.0+ is installed.

To test and use pqScan PDF to Image SDK in your ASP.NET application, the first thing you need to do is to download free SDK package online and add PDF to Gif converter DLL to your ASP.NET web project. It's very easy even for novice!

Convert PDF to GIF to View -- ASP.NET Demo

This demo is in C# programming language which demonstrates how to convert PDF file to GIF image in ASP.NET program and view on a web page. Just copy the sample code below and paste to your web application page load event. And you will see the GIF image converted from PDF document on the html page after running your ASP.NET web form project.

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)
    // Get your PDF document ready.
    string pdfFileName = Server.MapPath("sample.pdf");

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

    // Load your PDF document.

    // Prepare response.
    Response.ContentType = "image/gif";

    // Turn the first page of your PDF document to the output image.
    System.Drawing.Image gifImage = pdfDoc.ToImage(0);

    using (MemoryStream ms = new MemoryStream())
      // Save image as gif format.
      gifImage.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);

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



Here, VB.NET demo code for changing and streaming PDF document to GIF raster image is offered as well.

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 file.
    Dim pdfFileName As String = Server.MapPath("sample.pdf") 
    ' Create an instance of PQScan.PDFToImage.PDFDocument object.
    Dim pdfDoc As PDFDocument = New PDFDocument() 
    ' Load the PDF file.
    ' Prepare response.
    Response.ContentType = "image/gif"
    ' Transform the first page of PDF file to the output image.
    Dim gifImage As System.Drawing.Image = pdfDoc.ToImage(0) 
    Imports (MemoryStream ms = New MemoryStream())
      ' Save image as gif format.
      gifImage.Save(ms, System.Drawing.Imaging.ImageFormat.Gif)
      ' Display gif image to the aspx web page.
      Response.OutputStream.Write(ms.GetBuffer(), 0, CType(ms.Length, Integer))
  End Sub
End Class

convert pdf to gif in asp.net

pqScan SDK
.NET PDF to Image Library
Online Guide
PDF to Image Conversion in .NET
Conversion Type
VB.NET: Transform PDF to TIFF C#: Transform PDF to JPG C#: Transform PDF to TIF C#: Transform PDF to Bitmap .NET: Transform PDF to PNG .NET: Transform PDF to Multi-page TIFF ASP.NET: Transform PDF to GIF ASP.NET: Transform PDF to JPEG View All Image Types >>
I can't believe how efficient your PDF converter it is. So simple to use and completely integrated into my .NET project. I feel as if it was made precisely for my business! Great Thanks! Brian Gallagher