FreeSpire.PDF
8.6.0
dotnet add package FreeSpire.PDF --version 8.6.0
NuGet\Install-Package FreeSpire.PDF -Version 8.6.0
<PackageReference Include="FreeSpire.PDF" Version="8.6.0" />
paket add FreeSpire.PDF --version 8.6.0
#r "nuget: FreeSpire.PDF, 8.6.0"
// Install FreeSpire.PDF as a Cake Addin
#addin nuget:?package=FreeSpire.PDF&version=8.6.0
// Install FreeSpire.PDF as a Cake Tool
#tool nuget:?package=FreeSpire.PDF&version=8.6.0
.NET Library for Processing & Manipulating PDF Files
Product Page 丨 Documentation 丨 Examples 丨 Forum 丨 Temporary License 丨 Customized Demo
Free Spire.PDF for .NET is a Community Edition of the Spire.PDF for .NET, which is a totally free PDF API for commercial and personal use.
As a standalone .NET library, Free Spire.PDF for .NET enables developers to create, write, edit, convert, print, handle and read PDF files on any .NET( C#, VB.NET, ASP.NET, .NET Core) applications.
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 Jpeg/Jpg/Png/Bmp/Tiff/Gif/EMF 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
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. |
.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 was computed. net481 was computed. |
MonoAndroid | monoandroid is compatible. |
Xamarin.iOS | xamarinios is compatible. |
-
.NETCoreApp 2.0
- System.Drawing.Common (>= 4.5.0)
- System.Text.Encoding.CodePages (>= 4.5.0)
-
.NETFramework 4.0
- No dependencies.
-
MonoAndroid 0.0
- SkiaSharp (>= 1.68.0)
- System.Buffers (>= 4.5.0)
- System.Memory (>= 4.5.3)
- System.Runtime.CompilerServices.Unsafe (>= 4.6.0)
- System.Text.Encoding.CodePages (>= 4.6.0)
-
net6.0
- System.Drawing.Common (>= 6.0.0)
- System.Text.Encoding.CodePages (>= 6.0.0)
-
Xamarin.iOS 0.0
- SkiaSharp (>= 1.68.0)
- System.Buffers (>= 4.5.0)
- System.Memory (>= 4.5.3)
- System.Runtime.CompilerServices.Unsafe (>= 4.6.0)
- System.Text.Encoding.CodePages (>= 4.6.0)
NuGet packages (11)
Showing the top 5 NuGet packages that depend on FreeSpire.PDF:
Package | Downloads |
---|---|
Reinvent.Comum.Utils
Reinvent Utils |
|
Coreopsis.Toolkits
net6.0基础架构工具包 |
|
Tesseract.Lib
Package Description |
|
Cyss.Core.Helper
Package Description |
|
PdfHandy.Net
Fill text, image, u3d into acro form in pdf |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.6.0 | 164,781 | 7/19/2022 |
8.2.0 | 148,962 | 2/9/2022 |
7.8.9 | 274,590 | 8/24/2021 |
7.2.0 | 228,676 | 2/8/2021 |
6.10.6 | 84,639 | 10/21/2020 |
6.2.0 | 277,431 | 2/14/2020 |
5.10.0 | 138,186 | 10/15/2019 |
5.4.0 | 123,602 | 4/23/2019 |
5.1.0 | 79,586 | 1/23/2019 |
4.3.1 | 57,452 | 6/15/2018 |
3.2.0 | 213,654 | 1/14/2015 |
3.0.0 | 8,933 | 5/13/2014 |
2.9.37 | 8,856 | 3/17/2014 |
Free version is limited to 10 pages of PDF. This limitation is enforced during loading and creating files. When converting PDF to Image, the first 3 pages of PDF files will be converted to Image format successfully.