1. Products
  2.   PDF
  3.   .NET
  4.   PDFjet for .NET

PDFjet for .NET

 
 

Open Source .NET API for PDF Reporting

Generate PDF documents, universal Reporting support in your web or desktop application via .NET APIs.

PDFjet for .NET is an open source .NET library that allows software developers to generate universal PDF reports inside their web or desktop application without installing any external special software. PDFjet programming library is very simple to use than several other available libraries. The great thing is that the source code is well documented, very simple, clean, logical, and easy to understand. 

PDFjet library provides advanced text related features support such as Unicode support, Text kerning, embedding hyperlinks, embedding OpenType and TrueType fonts. It also provides advanced drawing support for points, lines, boxes, circles, Bezier curves, polygons, stars, and complex paths as well as shapes inside PDF documents.

Previous Next

Getting Started with PDFjet for .NET

PDFjet for .NET requires .NET Framework Version 2.0 Software Development Kit or higher. PDFjet for .NET also complies with .NET Core 2.1.402.  PDFjet for .NET also compiles cleanly and works flawlessly on Linux with Mono v1.9 and higher.

NuGet command

 Install Package PDFjet

.NET API to Generate PDF Reports

PDFjet for .NET provides software developers the capability to generate PDF reports inside your own applications. You can create Multi-page reports with just a few lines of code using the "Table" class. Once the document is created, you can easily insert new pages as well as add graphics or text elements into the existing PDF. You can also modify the existence of PDF files according to your desires and save it to an external disk.

Create PDF Files via .NET

 //Create PDF Files via .NET
  PDF pdf = new PDF();
  Font f1 = new Font(pdf, "Helvetica");
  Image image1 = new Image(pdf, "images/eu-map.png");
  Image image2 = new Image(pdf, "images/fruit.jpg");
  Image image3 = new Image(pdf, "images/mt-map.gif");
  // Please note:
  // All font and image objects must be created
  // before the first page object.

  Page page = new Page(pdf, A4.PORTRAIT);

  text.SetText("The map on the right is an embedded GIF image");
  text.SetPosition(90.0, 800);
  text.DrawOn(page);

  image3.SetPosition(390, 630);
  image3.ScaleBy(0.5);
  image3.DrawOn(page);

  pdf.wrap();
  pdf.save("Example_03.pdf");

Combine Multiple PDF Documents

Sometimes an organization requires to combine several PDF documents to one big document. PDFjet library provides developers the functionality for combining multiple PDF files into a single one with just a few lines of code. It also facilitates users to generate a new PDF document from the existing one. Give users the power to create reports of their choice with ease.

Insert List to PDF Files

PDFjet for Java simplifies the addition of a list to PDF documents inside their own application. To show a list of items in a PDF document, first, you need to create a list and then add list-items to it. It also provides support to pass a symbol (Unicode character) for marking the list-items. Numbered or lettered lists are supported. There are also specialized classes for Roman letters and Greek letters.

Add Pages to PDF Documents via .NET

The open source library PDFjet gives software developers the power to add new pages to PDF files as well as modify existing pages in a short time & minimum resources. It supports adding new content to an existing page in PDF with just a couple of lines of .NET code. The following sample code illustrates how to add a new page to a PDF using .NET code.

Add Pages to PDF via C# .NET

 //Add Pages to PDF via C# .NET
public Page(PDF pdf, float[] pageSize, bool addPageToPDF)
    {
      this.pdf = pdf;
      contents = new List();
      annots = new List();
      destinations = new List();
      width = pageSize[0];
      height = pageSize[1];
      buf = new MemoryStream(8192);

      if (addPageToPDF) {
      pdf.AddPage(this);
      }
    }
 English