Spire.PDFViewer for .NET
.NET PDF Viewer Library - View PDF files in C#, VB.NET
- Overview
- Examples
- Guideline
- Support
- What's New
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.
Furthermore, it can export PDFs to popular image formats like .bmp, .png and .jpeg. When viewing PDF document through Spire.PDFViewer, users can set display as fit page, page down/up, zoom in/out, etc. Spire.PDFViewer is a totally independent .NET library which designed for viewing PDF files from .NET application. It does NOT require Adobe Reader or any other 3rd party software/library installed on system.
-
Load
-
Built-in
-
Customize
-
Bookmarks
-
Thumbnails
-
Zoom
-
Image
-
Print
Load a PDF Document
Using Spire.PDFViewer, you can load a PDF document from disk or stream, and view it in a Windows Forms application.
PDFViewer with Built-in Toolbar
Spire.PDFViewer provides a “PdfViewer” control that has a built-in toolbar. Just drag and drop it into your Windows Forms application to own a professional PDF document viewer without any effort.
Customize Toolbar
Spire.PDFViewer offers a “PdfDocumentViewer” control that has no toolbar on the top of it. You can customize the toolbar according to the demands of your own project.
Display Bookmarks
Bookmarks panel is available in Spire.PDFViewer. By clicking a specific bookmark in the panel, you can quickly return or navigate to a specific place in the PDF document being viewed.
Display Page Thumbnails
Page thumbnails are miniature previews of the pages in a document. You can use the page thumbnails panel in Spire.PDFViewer to jump quickly to a selected PDF page.
Zoom In and Out
In Spire.PDFViewer, you will be able to change the document magnification using the Zoom control in the toolbar.
Convert PDF to Image
Converting PDF to image is required in some cases. For example, when you want to post a PDF document on your social media or embed it into a video.
Print PDF Documents
Spire.PDFViewer enables you to send a PDF document to a print dialog or print the document directly with the default print settings.
MAIN FUNCTION
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);
Support
As a standalone library, Spire.PDFViewer supports viewing formatted PDF such as embedded with hyperlinks. PDF with basic fonts (TrueType, Type 0, Type 1, Type 3, OpenType and CJK font) are also supported. Besides, this PDF Viewer supports PDF with filled text, clipped text, stroked text and supports PDF with lines, curve and table. Spire.PDFViewer supports DeveiceN PDF color space and DCT, JPEG2000 and CCITT Fax image formats in PDF. And it supports LZWDecode and FlateDecode.New Features
- 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.
Commercial Edition $799
Spire.PDFViewer is available on viewing PDF/A-1B, PDF/X1A and enables to open and read encrypted PDF files.
Free Edition $0
Free version is limited to 10 pages of PDF when viewing and printing PDF files.
GET STARTED
Free Trials for All Progress Solutions
Request free customized demo just for you. |
View PDF Files
Encrypted, With attachments, Embedding hyperlinks, Embedding fonts C# CodePrint PDF Documents
Print PDF DocumentsTutorials / C# CodePDF Page Rotation
PDF Page Rotation C# CodeWide Support PDF Content
Lines, Curve and Table C# CodeMultiple Printing Orientations
Landscape, Portrait and Automatic C# CodeExport PDF to Image
Export PDF to ImageTutorials / C# CodePage Operation
Fit page, Page down/up, Zoom in/outTutorials / C# CodeFour Viewing Modes
Self-motion, Single page, Serious and Dynamic C# Code
Beginners Guide is the first step towards learning the basic information of Spire.PDFViewer for .NET |
Program Guide lists the detailed features of our Spire.PDFViewer for .NET and you can search for the information you want. |
The Videos give an operation guide by video. You can check the produce step by step. |
|||||||||||
Main Functions
- Export PDF to Image
- View PDF Files encrypted, with attachments, embedding hyperlinks, basic fonts, embedding fonts
- Print PDF Documents
- PDF page rotation
- Multiple printing orientations: landscape, portrait, automatic
- Page Operation: Fit page, page down/up, zoom in/out
- Four Viewing Modes: Self-motion; Single page; Serious and Dynamic.
We guarantee one business day Forum questions Reply. |
We guarantee one business day E-mail response. |
Free Customized service for OEM Users. |
|||||||||||
Skype name: iceblue.support |
Apply for a Free Trial License File. |
||||||||||||
- It relates to our components stored on E-iceblue online store.
- It costs less than 2 hours for us to complete it. If it costs more than 2 hours, please contact our [email protected]
This is the list of changelogs of Spire.PDFViewer New release and hotfix. You can get the detail information of each version's new features and bug solutions.
Hot Fix Version: 7.12.6
Category | ID | Description |
New feature | SPIREPDFVIEWER-454 | Spire.PdfDocumentViewer supports obtaining the coordinates of a mouse click relative to the PDF page content.
private void Form1_Load(object sender, EventArgs e) { this.pdfDocumentViewer1.LoadFromFile("1.pdf"); this.pdfDocumentViewer1.MouseDown += new MouseEventHandler(PV_Click); } private void PV_Click(object sender, MouseEventArgs e) { string outputFile = "out.Pdf"; string outputFile_TXT = "out.txt"; File.Delete(outputFile_TXT); if (e.Button == MouseButtons.Left) { PointF[] controlPositions = new PointF[] { e.Location}; Spire.PdfViewer.Forms.PagePosition[] pagePositions = this.pdfDocumentViewer1.ControlToPage(controlPositions); string fileName = this.pdfDocumentViewer1.FileName; PdfDocument doc = new PdfDocument(); doc.LoadFromFile(fileName,FileFormat.PDF); PdfPageBase page = doc.Pages[pagePositions[0].PageIndex]; RectangleF bounds = new RectangleF(pagePositions[0].Position, new SizeF(100, 100)); PdfTextExtractor textExtractor = new PdfTextExtractor(page); PdfTextExtractOptions option = new PdfTextExtractOptions(); option.ExtractArea = bounds; string text = textExtractor.ExtractText(option); PdfFont font = new PdfFont(PdfFontFamily.Helvetica, 11); PdfTextWidget pdfTextbox = new PdfTextWidget(); pdfTextbox.Font = font; pdfTextbox.Brush = PdfBrushes.Red; pdfTextbox.Text = "stamp"; pdfTextbox.Draw(page, bounds); doc.Pages[pagePositions[0].PageIndex].Canvas.DrawRectangle(PdfPens.Red, bounds); doc.SaveToFile(outputFile); File.AppendAllText(outputFile_TXT, "Position: " + pagePositions[0].Position.ToString() + " text:\r " + text); MessageBox.Show("finish"); doc.Dispose(); } } |
Hot Fix Version: 7.12.3
Category | ID | Description |
New feature | SPIREPDFVIEWER-579 | Supports the interface zoom effect by using Ctrl + scroll wheel in WinForm projects.
this.KeyPreview = true; this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); this.KeyUp += new System.Windows.Forms.KeyEventHandler(Form1_KeyUp); this.MouseWheel += new System.Windows.Forms.MouseEventHandler(Form1_MouseWheel); private bool m_PressCtrl = false; private float m_ZoomFactor = 1.0f; private void Form1_KeyDown(object sender, KeyEventArgs e) { m_PressCtrl = e.Control; } private void Form1_KeyUp(object sender, KeyEventArgs e) { m_PressCtrl = false; } private float[] array = new float[] { 0.5f, 0.75f, 1f, 1.25f, 1.5f, 2f, 4f }; private int index = 2; private void Form1_MouseWheel(object sender, MouseEventArgs e) { if (m_PressCtrl) { if (e.Delta > 0) { index = index < 6 ? index + 1 : 6; } if (e.Delta < 0) { index = index == 0 ? 0 : index - 1; } this.pdfViewer1.SetZoomFactor(array[index]); } } |
Bug | SPIREPDFVIEWER -577 | Fixes the issue that text content could not be displayed. |
Hot Fix Version: 7.12.0
Category | ID | Description |
Bug | SPIREPDFVIEWER-575 | Fixed the issue that the application threw a "System.ArgumentNullException" exception when loading a PDF file. |
Bug | SPIREPDFVIEWER -576 | Fixed the issue that the application threw a "System.OutOfMemoryException" exception when loading a PDF file. |
Hot Fix Version: 7.11.0
Category | ID | Description |
Bug | SPIREPDFVIEWER-561 | Fixes the issue that the document content did not load smoothly when scrolling pages. |
Bug | SPIREPDFVIEWER-564 | Fixes the issue that the document content displayed incompletely. |
Hot Fix Version: 7.7.1
Category | ID | Description |
Bug | SPIREPDFVIEWER-492 | Optimizes document loading time. |
Bug | SPIREPDFVIEWER-542 | Fixes the issue that the document became blank when viewing. |
Bug | SPIREPDFVIEWER-547 | Fixes the issue that the application threw "value can not be null" when rotating PDF. |
Bug | SPIREPDFVIEWER-551 | Fixes the issue that the stamp was lost when viewing. |
Hot Fix Version: 7.1
Category | ID | Description |
New feature | SPIREPDFVIEWER-526 | Supports rotating page when viewing PDF by PdfViewer. |
Bug | SPIREPDFVIEWER-205 SPIREPDFVIEWER-206 SPIREPDFVIEWER-532 |
Fixes the issue that the PDF content displayed was incorrect. |
Bug | SPIREPDFVIEWER-219 SPIREPDFVIEWER-524 SPIREPDFVIEWER-528 |
Fixes the issue that the PDF content displayed was blank. |
Bug | SPIREPDFVIEWER-378 | Fixes the issue that the PDF text content displayed was garbled. |
Bug | SPIREPDFVIEWER-469 | Fixes the issue that the scroll bars still existed after setting "fitpage" for the zoom mode. |
Bug | SPIREPDFVIEWER-518 | Fixes the issue that the application threw "ArgumentOutOfRangeException" after changing the zoom mode. |
Bug | SPIREPDFVIEWER-519 SPIREPDFVIEWER-536 |
Fixes the issue that the PDF content displayed was incorrect when using in WPF project. |
Bug | SPIREPDFVIEWER-520 | Fixes the issue that the PDF image was covered. |
Bug | SPIREPDFVIEWER-543 | Fixes the issue that some PDF content can not be displayed. |
Hot Fix Version: 6.8.6
Category | ID | Description |
New feature | SPIREPDFVIEWER-514 | The ASP.NET control supports rotating pages.
input type=button id=PdfDocumentViewer1_btnRotate onfocus=this.blur() onclick=pdfdocumentviewer1.Rotate(pdfdocumentviewer1.RotateAngle + 270); value=rotate_270 |
New feature | SPIREPDFVIEWER-515 | The ASP.NET control supports finding and highlighting text.
input type=text id=PdfDocumentViewer1_txtFindText onkeydown=if(event.keyCode==13){pdfdocumentviewer1.SearchText(this.value,true);return false;} value= protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.PdfDocumentViewer1.FindTextHighLightColor = System.Drawing.Color.FromArgb(125, 255, 0, 0); this.PdfDocumentViewer1.LoadFromFile(input.pdf); } } |
Bug | SPIREPDFVIEWER-369 SPIREPDFVIEWER-433 SPIREPDFVIEWER-508 |
Fixes the issue that the display content of the PDF was incorrect. |
Bug | SPIREPDFVIEWER-491 | Fixes the issue that Chinese characters in PDF file were displayed incorrectly. |
Bug | SPIREPDFVIEWER-504 | Fixes the issue that the ASP.NET control poped up an error message when no PDF file was loaded. |
Bug | SPIREPDFVIEWER-506 | Fixes the issue that the image covered the text content. |
Bug | SPIREPDFVIEWER-513 | Fixes the issue that the display content of the PDF was blurred. |
Hot Fix Version: 6.6
Category | ID | Description |
Bug | SPIREPDFVIEWER-139 | Fixes the issue that there were garbled characters after opening PDF files. |
Bug | SPIREPDFVIEWER-230 SPIREPDFVIEWER-440 |
Fixes the issue that the content was incorrect after opening PDF files. |
Bug | SPIREPDFVIEWER-476 | Fixes the issue that the content was not displayed when zooming in to view the PDF. |
Bug | SPIREPDFVIEWER-440 | Fixes the issue that it displayed a blank page after opening the PDF file. |
Hot Fix Version: 6.3.2
Category | ID | Description |
New Feature | SPIREPDFVIEWER-482 | Supports setting page label color of the thumbnail.
this.pdfDocumentThumbnail1.PageLabelColor = Color.Green; this.pdfDocumentThumbnail1.PageLabelSelectedColor = Color.Yellow; |
Bug | SPIREPDFVIEWER-234 | Fixes the issue that it did not take effect after setting the rotation. |
Bug | SPIREPDFVIEWER-238 SPIREPDFVIEWER-241 | Fixes the issue that the display content of the PDF was incorrect. |
Bug | SPIREPDFVIEWER-254 SPIREPDFVIEWER-269 | Fixes the issue that the highlight position was incorrect. |
Bug | SPIREPDFVIEWER-281 | Fixes the issue that the WPF-PdfViewer control icon was displayed incorrectly. |
Bug | SPIREPDFVIEWER-483 | Fixes the issue that the application threw the error “InvalidArgument“when loading the PDF file. |
Hot Fix Version: 6.1
Category | ID | Description |
New Feature | SPIREPDFVIEWER-464 | Supports the function of displaying page labels |
Bug | SPIREPDFVIEWER-448 | Fixes the issue that the white color of the picture was displayed as black. |
Bug | SPIREPDFVIEWER-462 | Fixes the issue that Chinese characters were displayed in garbled characters. |
Bug | SPIREPDFVIEWER-466 | Fixes the issue that the page rotating failed. |
Bug | SPIREPDFVIEWER-467 | Fixes the issue that the background color of form fields was displayed incorrectly. |