Some test text!

Discord Logo

Chat with us

PDFTron is now Apryse, learn more here.

Go / Guides / Step by step



PDFTron is now Apryse, learn more here.

Get started with Go

Welcome to Apryse. Go for the Apryse SDK is supported on Windows and Linux. To get started, choose your preferred platform from the tabs below.

Go & Windows PDF library integration

This guide will help you run Apryse samples and integrate the Apryse SDK into Go applications on Windows. Your free trial includes unlimited trial usage and support from solution engineers.

Login/Sign Up to download the SDK


Mingw-w64 requirements
During installation, the default option will be i686 but this must be set to x86_64 in order to install the 64-bit version of this software.
Run Apryse SDK in production
A commercial license key is required for use in a production environment. Please fill out our licensing form if you do not have a valid license key.
Keep your commercial license key confidential.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).

Initial setup

  1. Run our Windows Go installer script located on github:
# Download the batch file or use curl from the command line
curl -o RunSampleWindows.bat

# Double-click RunSampleWindows.bat or run the batch file from the command line
start RunSampleWindows.bat
  1. Get your Apryse trial key.

Login/Sign Up to your account to get access to key

If your OS or Go version is not supported, the installation will fail.

Run the samples

  1. Open a command line console
  2. Change the directory to the samples folder
  3. Run all samples:
cd %HOMEPATH%\go\src\pdftron\Samples\

You can also enter any individual sample folder to run them separately. For example, here's how to run the AddImageTest sample:

cd %HOMEPATH%\go\src\pdftron\Samples\AddImageTest\GO

Integrate into your application

This section will show you how to use our SDK to create a simple Apryse "Hello World!" application. It will create a document with one blank page and save it as a linearized PDF in its running directory.

  1. Navigate into your /Samples directory and make a new directory called myApp (if it does not exist already). This guide will assume your application is named myApp. For organization, create a new directory inside myApp called GO.

  2. Navigate inside that GO directory and create a new GO file called myApp.go. Open it with your favorite text editor and paste this into it:

    package main
    import (
        . "pdftron"
    func main(){
        PDFNetInitialize()           // PDFNet must be initialized before accessing any Apryse API
        doc := NewPDFDoc()
        page := doc.PageCreate()     // Start a new page
        doc.PagePushBack(page)       // Add the page to document
        doc.Save("output.pdf", uint(SDFDocE_linearized)); // Save the document as a linearized PDF

    Run your application by executing go run myApp.go. Make sure that your interpreter can find the PDFNetC library. If all goes well, your console should output:

    PDFNet is running in demo mode.
    Permission: write
    Hello World!

Check the output.pdf that the program output in the same directory. It should be a PDF with one blank page.

Next step

Guides Samples

Get the answers you need: Support