Spire.PDFViewer
7.12.1
See the version list below for details.
dotnet add package Spire.PDFViewer --version 7.12.1
NuGet\Install-Package Spire.PDFViewer -Version 7.12.1
<PackageReference Include="Spire.PDFViewer" Version="7.12.1" />
paket add Spire.PDFViewer --version 7.12.1
#r "nuget: Spire.PDFViewer, 7.12.1"
// Install Spire.PDFViewer as a Cake Addin #addin nuget:?package=Spire.PDFViewer&version=7.12.1 // Install Spire.PDFViewer as a Cake Tool #tool nuget:?package=Spire.PDFViewer&version=7.12.1
.NET Library for Viewing and Printing PDF Files
Product Page 丨 Documentation 丨 Examples 丨 Forum 丨 Temporary License 丨 Customized Demo
Spire.PDFViewer is a powerful PDF Viewer library for .NET. It allows developers to load PDF document from stream, file and byte array.
Spire.PDFViewer is available on viewing PDF/A-1B, PDF/X1A and enables to open and read encrypted PDF files. This PDF Viewer control supports multiple printing orientation including landscape, portrait and automatic.
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;
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
viewer = new PdfDocumentViewer();
viewer.LoadFromFile("PDFViewer.pdf");
//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;
mainForm.Controls.Add(table);
table.Dock = DockStyle.Fill;
Application.Run(mainForm);
}
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);
image.Save(dialog.FileName);
}
}
}
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));
images[i].Save(fileName);
}
}
}
}
}
}
Product Page 丨 Documentation 丨 Examples 丨 Forum 丨 Temporary License 丨 Customized Demo
Product | Versions 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 is compatible. net481 was computed. |
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Spire.PDFViewer:
Package | Downloads |
---|---|
Spire.Office
Spire.Office for .NET is a combination of Enterprise-Level Office .NET components offered by E-iceblue. It includes Spire.Doc, Spire XLS, Spire.Presentation, Spire.PDF, Spire.DataExport, Spire.PDFViewer, Spire.DocViewer, Spire.Email and Spire.BarCode. Spire.Office contains the most up-to-date versions of the above .NET components. From Spire.Office 3.10.1, Spire.Office supports to work on .NET Core,.NET Standard, Xamarin. With Spire.Office for .NET, developers can create a wide range of applications. It enables developers to open, create, modify, convert, print, View MS Word, Excel, PowerPoint and PDF documents. Furthermore, it allows users to export data to popular files such as MS Word/Excel/RTF/Access, PowerPoint, PDF, XPS, HTML, XML, Text, CSV, DBF, Clipboard, SYLK, etc. As an independent Office .NET component, Spire.Office doesn't need Microsoft Office to be installed on neither the development nor target systems. In addition, it is a better alternative to MS Office Automation in terms of security, stability, scalability, speed, price and features. Spire.Office for .NET can be linked into any type of a 32-bit or 64-bit .NET application including ASP.NET, Web Services and WinForms for .NET Framework version 2.0 to 4.5, .NET Core, .NET standard 2.0 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
7.12.23 | 3,329 | 8/13/2024 |
7.12.14 | 2,986 | 4/16/2024 |
7.12.11 | 660 | 3/21/2024 |
7.12.6 | 1,250 | 2/7/2024 |
7.12.3 | 995 | 12/21/2023 |
7.12.1 | 1,358 | 10/27/2023 |
7.12.0 | 1,493 | 8/17/2023 |
7.11.0 | 1,294 | 6/9/2023 |
7.10.3 | 3,223 | 10/17/2022 |
7.7.0 | 2,241 | 7/19/2022 |
7.1.0 | 2,989 | 1/20/2022 |
6.8.6 | 1,515 | 8/25/2021 |
6.6.0 | 4,203 | 6/10/2021 |
6.3.2 | 1,093 | 3/22/2021 |
6.1.1 | 1,021 | 1/26/2021 |
6.1.0 | 684 | 1/14/2021 |
5.11.2 | 1,369 | 11/13/2020 |
5.8.2 | 1,727 | 8/12/2020 |
5.7.2 | 1,076 | 7/6/2020 |
5.1.4 | 5,930 | 1/21/2020 |
5.1.0 | 787 | 1/15/2020 |
4.11.8 | 1,293 | 11/18/2019 |
4.9.5 | 1,268 | 9/18/2019 |
4.5.1 | 2,885 | 5/8/2019 |
4.2.2 | 1,851 | 2/14/2019 |
4.1.13 | 1,055 | 1/31/2019 |
4.1.5 | 1,450 | 1/19/2019 |
4.1.0 | 1,612 | 1/5/2019 |
3.12.6 | 3,373 | 12/19/2018 |
3.12.1 | 1,184 | 12/7/2018 |
3.6.3 | 4,177 | 6/28/2018 |
3.3.0 | 4,039 | 3/26/2018 |
3.2.0 | 1,423 | 2/9/2018 |
2.12.60 | 1,273 | 1/18/2018 |
2.12.57 | 1,344 | 12/29/2017 |
2.12.49 | 1,254 | 11/29/2017 |
2.12.44 | 1,170 | 11/17/2017 |
2.12.38 | 1,309 | 10/20/2017 |
2.12.34 | 2,316 | 9/26/2017 |
2.12.19 | 1,852 | 7/13/2017 |
2.12.16 | 1,281 | 7/10/2017 |