.NET Standard library

Docotic.Pdf library help > .NET Standard library

Docotic.Pdf has a version for .NET Standard Library. 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.

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

    using BitMiracle.Docotic.Pdf;
    private static void helloPdf(string outputName)
        // replace string.Empty with your license key
        using (PdfDocument pdf = new PdfDocument())
            // draws "Hello world" on the first page
            PdfPage page = pdf.Pages[0];
            page.Canvas.DrawString(20, 20, "Hello world!");
    Imports BitMiracle.Docotic.Pdf
    Private Shared Sub helloPdf(outputName As String)
        ' replace string.Empty with your license key
        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!")
        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.