FreeSpire.PDFViewer 4.1.0

.NET Framework 2.0
There is a newer version of this package available.
See the version list below for details.
dotnet add package FreeSpire.PDFViewer --version 4.1.0
NuGet\Install-Package FreeSpire.PDFViewer -Version 4.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FreeSpire.PDFViewer" Version="4.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FreeSpire.PDFViewer --version 4.1.0
#r "nuget: FreeSpire.PDFViewer, 4.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FreeSpire.PDFViewer as a Cake Addin
#addin nuget:?package=FreeSpire.PDFViewer&version=4.1.0

// Install FreeSpire.PDFViewer as a Cake Tool
#tool nuget:?package=FreeSpire.PDFViewer&version=4.1.0

.NET Library for Viewing and Printing PDF Files

Product PageDocumentationExamplesForumTemporary LicenseCustomized Demo

Free Spire.PDFViewer for .NET is a Community Edition of the Spire.PDFViewer for .NET, which is a powerful viewer API for commercial and personal use.

By using Free Spire.PDFViewer for .NET, developers can view PDF/A-1B, PDF/X1A files and open and read encrypted PDF files.

Main Features

  • Load PDF from file, stream and byte array;
  • Support PDF/A-1B, PDF/X1A;
  • Enable to open and read encrypted PDF files;
  • Support multiple printing orientations: landscape, portrait, automatic;
  • Export PDFs to Image format as .bmp, .png, .jpeg;
  • Set PDF page (page down/up, zoom in/out, display as fit page).
  • Locate the root of the bookmarks and switch to target bookmark;
  • Support Rotation, Page layout setup and Thumbnail control;
  • Locate the PDF attachments which is marked in PDF, and save them to disk;
  • Four Viewing Patterns: Self-motion, Single page, Serious and Dynamic. Users can also switch over the four patterns.

Technical Features

  • Microsoft .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0 supported;
  • For Windows Form Only;
  • ASCIIHex decode, ASCII85 decode, Flate decode, LZW decode, Run Length decode, CCITTFax decode, DCT decode, JPX decode supported;
  • Developed entirely in C#, being 100% managed code;
  • Totally independent .NET control library. Does NOT require Adobe Reader or any other 3rd party software/library installed on system.

Export Documents to images

using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;

using Spire.PdfViewer.Forms;

namespace Spire.PdfView.Demos.Export
    class Program
        private static PdfDocumentViewer viewer = null;

        static void Main(string[] args)

            viewer = new PdfDocumentViewer();

            //form and child components
            Form mainForm = new Form();
            mainForm.Text = "Spire.PdfView Demo - Export";
            mainForm.Size = new System.Drawing.Size(800, 600);
            mainForm.StartPosition = FormStartPosition.CenterScreen;

            TableLayoutPanel table = new TableLayoutPanel();
            table.ColumnCount = 3;
            table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50));
            table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20));
            table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50));
            table.RowCount = 2;
            table.RowStyles.Add(new RowStyle(SizeType.Percent, 100));
            table.RowStyles.Add(new RowStyle(SizeType.Absolute, 30));

            table.Controls.Add(viewer, 0, 0);
            table.SetColumnSpan(viewer, 3);
            viewer.Dock = DockStyle.Fill;

            //Export current page to one image
            Button button = new Button();
            button.Text = "Export to one image";
            button.Size = new Size(180, 24);
            button.TextAlign = ContentAlignment.MiddleCenter;
            table.Controls.Add(button, 0, 1);
            button.Dock = DockStyle.Right;
            button.Click += ExportToOneImage;

            //Export current pdf document to multiple images
            button = new Button();
            button.Text = "Export to multiple images";
            button.Size = new Size(180, 24);
            button.TextAlign = ContentAlignment.MiddleCenter;
            table.Controls.Add(button, 2, 1);
            button.Dock = DockStyle.Left;
            button.Click += ExportToMultipleImages;

            table.Dock = DockStyle.Fill;


        private static void ExportToOneImage(object sender, EventArgs e)
            if (viewer.PageCount > 0)
                SaveFileDialog dialog = new SaveFileDialog();
                dialog.Filter = "PNG Format(*.png)|*.png";
                if (dialog.ShowDialog() == DialogResult.OK)
                    int currentPage = viewer.CurrentPageNumber;
                    Bitmap image = viewer.SaveAsImage(currentPage - 1);

        private static void ExportToMultipleImages(object sender, EventArgs e)
            if (viewer.PageCount > 0)
                FolderBrowserDialog dialog = new FolderBrowserDialog();
                if (dialog.ShowDialog() == DialogResult.OK)
                    int currentPage = viewer.CurrentPageNumber;
                    Bitmap[] images = viewer.SaveAsImage(0, currentPage - 1);
                    for (int i = 0; i < images.Length; i++)
                        String fileName = Path.Combine(dialog.SelectedPath, String.Format("PDFViewer-{0}.png", i));

Product PageDocumentationExamplesForumTemporary LicenseCustomized Demo

Product Compatible and additional computed target framework versions.
.NET Framework net20 is compatible.  net35 was computed.  net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on FreeSpire.PDFViewer:

Package Downloads

自己用的WPF轮子,封装好ORM + UI框架


针对 Latex语法进行处理,项目仅支持.net 4.8

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.6.0 5,066 7/28/2022
4.1.0 71,285 1/24/2019
3.4.0 2,882 6/28/2018
2.4.35 18,420 2/4/2015