FreeSpire.PDF 8.6.0

.NET 6.0 .NET Core 2.0 .NET Framework 4.0
dotnet add package FreeSpire.PDF --version 8.6.0
NuGet\Install-Package FreeSpire.PDF -Version 8.6.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.PDF" Version="8.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FreeSpire.PDF --version 8.6.0
#r "nuget: FreeSpire.PDF, 8.6.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.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


Foo

Product PageDocumentationExamplesForumTemporary LicenseCustomized 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.

Conversions

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 PageDocumentationExamplesForumTemporary LicenseCustomized Demo

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Framework net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
Xamarin.iOS xamarinios
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on FreeSpire.PDF:

Package Downloads
Reinvent.Comum.Utils

Reinvent Utils

Tesseract.Lib

Package Description

PdfHandy.Net

Fill text, image, u3d into acro form in pdf

Cyss.Core.Helper

Package Description

U3DSpace

Writer/Reader for Universal 3D format (ECMA-363).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.6.0 104,763 7/19/2022
8.2.0 128,677 2/9/2022
7.8.9 239,886 8/24/2021
7.2.0 211,497 2/8/2021
6.10.6 79,820 10/21/2020
6.2.0 265,673 2/14/2020
5.10.0 131,698 10/15/2019
5.4.0 119,192 4/23/2019
5.1.0 76,997 1/23/2019
4.3.1 54,822 6/15/2018
3.2.0 206,653 1/14/2015
3.0.0 8,852 5/13/2014
2.9.37 8,775 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.