Docotic.Pdf Library Help > .NET Standard Library

Docotic.Pdf has version for .NET Standard Library 1.3. Thus, you can use Docotic.Pdf in .NET Core and UWP projects. .NET Core apps can run on Windows, on Linux and on Mac. This article explains the basics to get you up and running to process PDF files in your .NET Core application.

Docotic.Pdf for .NET Standard is only available with Ultimate License.

Some features are not supported in .NET Standard build yet:

  • PDF to image conversion (PdfPage.Save() and PdfPage.Draw(Graphics) methods)

  • Extraction of images with masks

  • Scaling and resizing of images

  • Creation of image masks

  • Loading of fonts from the collection of system fonts

Using Docotic.Pdf in .NET Core application

  1. Setup your environment for .NET Core development as described here. In this article we will use Visual Studio Community 2015 on Windows, but you can use any appropriate OS and IDE.

  2. Create a new .NET Core project. For example, console application.

    Create .NET Core project in Visual Studio 2015
  3. Add Docotic.Pdf NuGet package to the project.

  4. Add the following method to the project's source code

    C#
    using BitMiracle.Docotic.Pdf;
    
    ...
    
    private static void helloPdf(string outputName)
    {
        // replace string.Empty with your Ultimate License key
        BitMiracle.Docotic.LicenseManager.AddLicenseData(string.Empty);
    
        using (PdfDocument pdf = new PdfDocument())
        {
            // draws "Hello world" on the first page
            PdfPage page = pdf.Pages[0];
            page.Canvas.DrawString(20, 20, "Hello world!");
    
            pdf.Save(outputName);
        }
    }
    VB
    Imports BitMiracle.Docotic.Pdf
    
    ...
    
    Private Shared Sub helloPdf(outputName As String)
        ' replace string.Empty with your Ultimate license key
        BitMiracle.Docotic.LicenseManager.AddLicenseData(String.Empty)
    
        Using pdf As New PdfDocument()
            ' draws "Hello world" on the first page
            Dim page As PdfPage = pdf.Pages(0)
            page.Canvas.DrawString(20, 20, "Hello world!")
    
            pdf.Save(outputName)
        End Using
    End Sub
  5. Call helloPdf() method from your code. Pass a path to output PDF file as a parameter. This will create a PDF document like that:

    Hello, PDF!

Now you should be able to develop PDF-related features in your .NET Core or UWP projects using Docotic.Pdf library. Have a look at our samples for more detail.