Spire.PDF
10.12.4
dotnet add package Spire.PDF --version 10.12.4
NuGet\Install-Package Spire.PDF -Version 10.12.4
<PackageReference Include="Spire.PDF" Version="10.12.4" />
paket add Spire.PDF --version 10.12.4
#r "nuget: Spire.PDF, 10.12.4"
// Install Spire.PDF as a Cake Addin #addin nuget:?package=Spire.PDF&version=10.12.4 // Install Spire.PDF as a Cake Tool #tool nuget:?package=Spire.PDF&version=10.12.4
.NET Library for Processing & Manipulating PDF Files
Product Page 丨 Documentation 丨 Examples 丨 Forum 丨 Temporary License 丨 Customized Demo
Spire.PDF for .NET is a professional PDF API applied to creating, writing, editing, handling and reading PDF files without any external dependencies within .NET ( C#, VB.NET, ASP.NET, .NET Core, .NET 5.0, MonoAndroid and Xamarin.iOS ) application.
Using this .NET PDF library, you can implement rich capabilities to create PDF files from scratch or process existing PDF documents entirely through C#/VB.NET without installing Adobe Acrobat.
PDF Processing Features
- Generate/write/read/edit PDF documents.
- Supports 14 core, Type 1, True Type, Type 3, CJK & Unicode fonts.
- Extract images, text, pages and attachments from a PDF document with great speed and accuracy.
- Merge/split PDF documents and overlay documents.
- Convert HTML to PDF, XPS to PDF, Text to PDF and images to PDF to PDF and convert PDF to Excel, convert PDF to Word, convert PDF to images with efficient performance.
- Encrypt/Decrypt PDF, modify PDF passwords and create PDF digital signatures.
- Add and modify text/image bookmarks.
- Add text in Footer/Header.
- Export database table and pictures to PDF.
- Add Hyperlinks, work with actions/Javascript Action/Action Chain/Action Annotation.
- Add/remove/edit/fill fields.
Conversions
- Convert Webpage HTML to PDF, HTML ASPX to PDF
- Convert Image to PDF
- Convert Text to PDF
- Convert PDF to HTML
- Convert XPS to PDF
- Convert PDF to SVG
- Convert PDF to XPS
- Convert PDF to Image
- Convert PDF to Word
- Convert PDF to Excel
- Convert PDF to Markdown
Support Environment
- Fully written in C# and also support VB.NET.
- Applied on .NET Framework 2.0, 3.5, 3.5 Client Profile, 4.0, 4.0 Client Profile,4.5 and .NET Standard 2.0, .NET Core, .NET 5.0, MonoAndroid and Xamarin.Ios.
- Support Windows Forms and ASP.NET Applications.
- Support 32-bit OS
- Support 64-bit OS
- Support PDF Version 1.2, 1.3, 1.4, 1.5, 1.6 and 1.7.
- PDF API reference in HTML.
- Be Independent and do not need Adobe Acrobat or other third party PDF libraries.
Convert PDF to DOC in C#
//Create a PDF document and load sample PDF.
PdfDocument doc = new PdfDocument();
doc.LoadFromFile("test.pdf");
//Use SaveToFile method and set conversion target parameter as FileFormat.DOC.
doc.SaveToFile("PDFtoDoc.doc", FileFormat.DOC);
Convert PDF to images in C#
//Create a PDF document and load sample PDF.
PdfDocument doc = new PdfDocument();
doc.LoadFromFile("sample.pdf");
Image bmp = doc.SaveAsImage(0);
Image emf = doc.SaveAsImage(0, Spire.Pdf.Graphics.PdfImageType.Metafile);
Image zoomImg = new Bitmap((int)(emf.Size.Width * 2), (int)(emf.Size.Height * 2));
using (Graphics g = Graphics.FromImage(zoomImg))
{
g.ScaleTransform(2.0f, 2.0f);
g.DrawImage(emf, new Rectangle(new Point(0, 0), emf.Size), new Rectangle(new Point(0, 0), emf.Size), GraphicsUnit.Pixel);
}
//Save as BMP
bmp.Save("convertToBmp.bmp", ImageFormat.Bmp);
System.Diagnostics.Process.Start("convertToBmp.bmp");
//Save as EMF
emf.Save("convertToEmf.png", ImageFormat.Png);
System.Diagnostics.Process.Start("convertToEmf.png");
//SAVE as ZoomImg
zoomImg.Save("convertToZoom.png", ImageFormat.Png);
System.Diagnostics.Process.Start("convertToZoom.png");
Convert HTML to PDF in C#
//Create a pdf document.
PdfDocument doc = new PdfDocument();
PdfPageSettings setting = new PdfPageSettings();
setting.Size = new SizeF(1000,1000);
setting.Margins = new Spire.Pdf.Graphics.PdfMargins(20);
PdfHtmlLayoutFormat htmlLayoutFormat = new PdfHtmlLayoutFormat();
htmlLayoutFormat.IsWaiting = true;
String url = "https://www.wikipedia.org/";
Thread thread = new Thread(() =>
{ doc.LoadFromHTML(url, false, false, false, setting,htmlLayoutFormat); });
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
//Save pdf file.
doc.SaveToFile("output-wiki.pdf");
Product Page 丨 Documentation 丨 Examples 丨 Forum 丨 Temporary License 丨 Customized Demo
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
-
.NETCoreApp 2.0
- System.Drawing.Common (>= 4.5.0)
- System.Text.Encoding.CodePages (>= 4.5.0)
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
net6.0
- System.Drawing.Common (>= 6.0.0)
- System.Text.Encoding.CodePages (>= 6.0.0)
NuGet packages (12)
Showing the top 5 NuGet packages that depend on Spire.PDF:
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 |
|
Spire.PDFViewer
Spire.PDFViewer is an easy-to-use and reliable .NET PDF Viewer component. With Spire.PDFViewer, developers can create any WinForms application to open, view and print PDF document in C# and Visual Basic on .NET(2.0, 3.5, 4.0,4.6 and 4.0 ClientProfile). Open and View Spire.PDFViewer for .NET can open and view PDF/A-1B, PDF/X1A and even encrypted document. When viewing, developers can view with zoom in/out, page up/down, moving to the first/last page or fitting page/width. Also, hand tool is available. Elements Spire.PDFViewer for .NET supports kinds of PDF fonts, including TrueType, Type0, Type1, Type3, OpenType and CJK font. It also support hyperlinks, DeviceN color space and JPEG2000, DCT, CCITT Fax Image format in PDF. Print Spire.PDFViewer enables developers to print PDF document and supports page setup before printing, such as margins, page orientation, page size etc. Also, developers can choose specified one page, current page, mulitple pages or all pages to print. PDF to Image Spire.PDFViewer for .NET enables developers to save PDF pages(specified one, current page, mulitple pages, all pages) to image formats(.bmp, .png, .jpeg). |
|
James.Testing.Pdf
A library of helpers for the purpose of testing pdf documents/content. It is named after the author who wrote the book of James in the Bible. (James 1:2-3) |
|
Spire.OfficeViewer
Spire.OfficeViewer for .NET is a powerful Office Viewer component for .NET. It enables developers to load Word, Excel, Presentation slides and PDF files and view them from code. As a standalone .NET class library, Spire.OfficeViewer mainly focus on how to display office documents and PDF files. It enables developers/programmers to directly view and print office files and PDFs for their .NET applications. It supports to view the DOC, DOCX, DOT, XLS, XLSX, XLSB, ODS, PPT, PPTX, PPS, PPSX and PDF file formats. Spire.OfficeViewer is a totally independent .NET library which doesn't need to install Microsoft Office and Adobe Reader or any other 3rd party software/library on system. Main Functions Load office documents and PDF from file and view; Switch to target page Fit page; Fit width; Fit height Page down/up; Zoom in/out; Hand tool; Print; |
|
MACRIM.Extensions
Package of IEntity extensions for MSSQL, Azure, PDF and more |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Spire.PDF:
Repository | Stars |
---|---|
taurusxin/Ofd2Pdf
Convert OFD files to PDF files.
|
Version | Downloads | Last updated |
---|---|---|
10.12.4 | 2,565 | 12/17/2024 |
10.11.7 | 7,574 | 11/29/2024 |
10.11.1 | 11,570 | 11/6/2024 |
10.10.5 | 8,399 | 10/24/2024 |
10.10.0 | 9,802 | 10/10/2024 |
10.9.0 | 16,468 | 9/14/2024 |
10.8.1 | 16,987 | 8/20/2024 |
10.7.21 | 11,431 | 7/29/2024 |
10.7.13 | 8,018 | 7/17/2024 |
10.6.25 | 18,993 | 6/26/2024 |
10.6.7 | 7,929 | 6/13/2024 |
10.6.0 | 17,000 | 6/4/2024 |
10.5.5 | 20,002 | 5/16/2024 |
10.4.7 | 23,024 | 4/23/2024 |
10.4.2 | 11,659 | 4/12/2024 |
10.3.16 | 22,595 | 3/28/2024 |
10.3.7 | 15,324 | 3/14/2024 |
10.2.2 | 35,426 | 2/4/2024 |
10.1.17 | 21,662 | 1/26/2024 |
10.1.0 | 25,967 | 1/5/2024 |
9.12.0 | 41,479 | 12/8/2023 |
9.11.4 | 19,389 | 11/10/2023 |
9.11.0 | 12,297 | 11/3/2023 |
9.10.2 | 49,734 | 10/13/2023 |
9.9.9 | 20,420 | 9/21/2023 |
9.9.3 | 14,725 | 9/8/2023 |
9.8.5 | 44,062 | 8/10/2023 |
9.7.17 | 17,515 | 7/27/2023 |
9.7.14 | 16,345 | 7/20/2023 |
9.7.0 | 23,323 | 7/3/2023 |
9.6.0 | 63,529 | 6/5/2023 |
9.5.4 | 16,256 | 5/23/2023 |
9.4.12 | 23,183 | 4/28/2023 |
9.4.0 | 33,894 | 4/6/2023 |
9.3.4 | 54,492 | 3/15/2023 |
9.3.2 | 15,884 | 3/7/2023 |
9.2.6 | 24,630 | 2/15/2023 |
9.2.2 | 20,208 | 2/3/2023 |
9.1.0 | 89,664 | 1/5/2023 |
8.12.7 | 11,821 | 12/29/2022 |
8.12.5 | 19,791 | 12/14/2022 |
8.11.10 | 13,041 | 11/30/2022 |
8.11.2 | 32,334 | 11/16/2022 |
8.11.0 | 17,772 | 11/3/2022 |
8.10.5 | 13,280 | 10/19/2022 |
8.9.16 | 17,119 | 9/30/2022 |
8.9.2 | 20,017 | 9/14/2022 |
8.8.6 | 23,647 | 8/17/2022 |
8.7.9 | 24,309 | 7/27/2022 |
8.7.2 | 23,504 | 7/5/2022 |
8.6.1 | 39,022 | 6/8/2022 |
8.5.0 | 28,806 | 5/6/2022 |
8.4.15 | 26,126 | 4/21/2022 |
8.3.9 | 44,338 | 3/23/2022 |
8.2.2 | 41,728 | 2/22/2022 |
8.1.4 | 76,861 | 1/19/2022 |
8.1.0 | 49,464 | 1/6/2022 |
7.12.1 | 61,383 | 12/8/2021 |
7.11.1 | 88,473 | 11/9/2021 |
7.10.4 | 34,206 | 10/19/2021 |
7.10.0 | 12,170 | 10/9/2021 |
7.9.6 | 36,817 | 9/22/2021 |
7.9.2 | 26,149 | 9/2/2021 |
7.8.8 | 15,003 | 8/20/2021 |
7.8.2 | 22,520 | 8/4/2021 |
7.7.10 | 22,186 | 7/22/2021 |
7.6.15 | 23,816 | 6/29/2021 |
7.6.1 | 23,479 | 6/10/2021 |
7.5.0 | 31,152 | 5/7/2021 |
7.4.13 | 19,262 | 4/27/2021 |
7.4.5 | 50,625 | 4/14/2021 |
7.3.3 | 20,161 | 3/19/2021 |
7.3.1 | 11,288 | 3/12/2021 |
7.2.9 | 19,227 | 2/20/2021 |
7.2.5 | 19,204 | 2/7/2021 |
7.2.0 | 11,971 | 2/2/2021 |
7.1.10 | 18,456 | 1/15/2021 |
7.1.0 | 18,147 | 1/7/2021 |
6.12.20 | 10,209 | 12/25/2020 |
6.12.10 | 9,141 | 12/10/2020 |
6.12.3 | 10,121 | 12/7/2020 |
6.11.6 | 20,745 | 11/13/2020 |
6.11.0 | 9,453 | 11/4/2020 |
6.10.9 | 11,761 | 10/27/2020 |
6.10.4 | 14,828 | 10/20/2020 |
6.10.0 | 10,283 | 10/10/2020 |
6.9.16 | 21,078 | 9/28/2020 |
6.9.0 | 45,958 | 9/3/2020 |
6.8.5 | 34,418 | 8/17/2020 |
6.8.1 | 18,156 | 8/6/2020 |
6.7.12 | 15,658 | 7/29/2020 |
6.7.8 | 23,190 | 7/20/2020 |
6.7.6 | 9,825 | 7/8/2020 |
6.7.2 | 16,130 | 7/6/2020 |
6.5.15 | 32,823 | 5/28/2020 |
6.5.9 | 9,940 | 5/18/2020 |
6.5.6 | 33,619 | 5/13/2020 |
6.4.11 | 93,936 | 4/20/2020 |
6.4.4 | 10,685 | 4/10/2020 |
6.3.16 | 12,647 | 3/30/2020 |
6.3.10 | 33,978 | 3/23/2020 |
6.3.0 | 26,673 | 3/4/2020 |
6.2.6 | 14,188 | 2/19/2020 |
6.2.1 | 30,880 | 2/11/2020 |
6.1.8 | 33,925 | 1/21/2020 |
6.1.4 | 16,370 | 1/9/2020 |
5.12.15 | 27,221 | 12/16/2019 |
5.12.3 | 8,749 | 12/5/2019 |
5.11.18 | 9,564 | 11/29/2019 |
5.11.2 | 27,052 | 11/7/2019 |
5.11.0 | 9,862 | 11/1/2019 |
5.10.8 | 15,767 | 10/22/2019 |
5.10.2 | 18,685 | 10/11/2019 |
5.9.16 | 12,804 | 9/30/2019 |
5.9.6 | 11,245 | 9/18/2019 |
5.8.16 | 37,604 | 8/30/2019 |
5.8.7 | 35,524 | 8/13/2019 |
5.8.2 | 11,493 | 8/6/2019 |
5.7.20 | 9,156 | 7/31/2019 |
5.7.0 | 33,874 | 7/2/2019 |
5.6.31 | 9,555 | 7/1/2019 |
5.6.2 | 23,387 | 6/6/2019 |
5.5.21 | 18,079 | 5/24/2019 |
5.4.21 | 56,067 | 5/1/2019 |
5.4.20 | 6,454 | 4/29/2019 |
5.4.9 | 15,649 | 4/15/2019 |
5.4.1 | 14,291 | 4/4/2019 |
5.3.8 | 1,218,011 | 3/19/2019 |
5.3.2 | 8,827 | 3/11/2019 |
5.2.15 | 8,812 | 2/28/2019 |
5.2.3 | 9,167 | 2/14/2019 |
5.1.33 | 8,694 | 1/31/2019 |
5.1.16 | 8,362 | 1/19/2019 |
5.1.4 | 10,438 | 1/11/2019 |
5.1.0 | 12,754 | 1/2/2019 |
4.12.8 | 31,813 | 12/18/2018 |
4.12.2 | 11,821 | 12/7/2018 |
4.11.12 | 11,034 | 11/28/2018 |
4.11.8 | 43,120 | 11/16/2018 |
4.11.5 | 11,593 | 11/9/2018 |
4.11.3 | 36,345 | 11/8/2018 |