Spire.PDF.NETCore 7.12.1

.NET Core 2.0
dotnet add package Spire.PDF.NETCore --version 7.12.1
NuGet\Install-Package Spire.PDF.NETCore -Version 7.12.1
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="Spire.PDF.NETCore" Version="7.12.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Spire.PDF.NETCore --version 7.12.1
#r "nuget: Spire.PDF.NETCore, 7.12.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Spire.PDF.NETCore as a Cake Addin
#addin nuget:?package=Spire.PDF.NETCore&version=7.12.1

// Install Spire.PDF.NETCore as a Cake Tool
#tool nuget:?package=Spire.PDF.NETCore&version=7.12.1

.NET Library for Processing & Manipulating PDF Files


Product PageDocumentationExamplesForumTemporary LicenseCustomized 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, XPS, Text and images to PDF and convert PDF to Excel,Word,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, HTML ASPX to PDF
  • Convert Image(Jpeg, Jpg, Png, Bmp, Tiff, Gif, EMF, Ico) 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

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
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.12.1 3,885 12/8/2021
7.11.1 929 11/9/2021
7.10.4 354 10/19/2021
7.10.0 274 10/9/2021
7.9.6 375 9/22/2021
7.9.2 297 9/2/2021
7.8.8 564 8/20/2021
7.8.2 678 8/4/2021
7.7.10 3,338 7/22/2021
7.6.15 326 6/29/2021
7.6.1 528 6/10/2021
7.5.7 361 5/21/2021
7.5.0 414 5/7/2021
7.4.13 495 4/27/2021
7.4.5 291 4/14/2021
7.3.3 380 3/19/2021
7.3.1 332 3/12/2021
7.2.9 637 2/20/2021
7.2.5 293 2/7/2021
7.2.0 303 2/2/2021
7.1.10 289 1/15/2021
7.1.0 347 1/7/2021
6.12.20 367 12/25/2020
6.12.10 317 12/10/2020
6.12.3 287 12/7/2020
6.11.0 304 11/4/2020
6.10.9 328 10/27/2020
6.10.4 355 10/20/2020
6.10.0 365 10/12/2020
6.9.16 364 10/10/2020