For the complete documentation index, see llms.txt. This page is also available as Markdown.

Go (C Interface Binding) new project with Apryse SDK PDF library integration

This guide will help you integrate a free trial of the Apryse SDK with Go using Apryse Headers on macOS, Linux or Windows in a new Go app. (Or see instructions for incorporation with an existing project.) Your free trial includes unlimited trial usage and support from solution engineers.

Prerequisites

Make sure Go is installed at /usr/local/go and /usr/local/go/bin.

  • Apryse SDK for macOS

curl -L -O https://downloads.apryse.com/downloads/PDFNetCMac.zip
unzip PDFNetCMac.zip
  • Get your Apryse trial key.

spinner

License Key Required

The trial of Apryse SDK requires a trial license key, which is provided in the box titled "License Key". A commercial license key is required for use in a production environment. Please contact sales to purchase a commercial key or if you need any other license key assistance.

Setup

  1. Create a project directory called myApp.

  2. Extract the PDFNetCMac package as a folder into your project directory.

~/myApp
~/myApp/PDFNetCMac
~/myApp/PDFNetCMac/Headers
~/myApp/PDFNetCMac/Lib
...

Integrate Apryse SDK with Go

  1. In your project directory, create a new file called myApp.goAdd the following code inside:Save and close the file.Your folder should look similar to:

  1. In the project folder, run:This will produce a myApp executable file.

  1. Run the executable file. The executable will produce a pdf with a blank page in a linearized format.

Make sure Go is part of your path variable.

  • Apryse SDK for Windows

spinner
spinner
  • Get your Apryse trial key.

spinner

License Key Required

The trial of Apryse SDK requires a trial license key, which is provided in the box titled "License Key". A commercial license key is required for use in a production environment. Please contact sales to purchase a commercial key or if you need any other license key assistance.

Setup

  1. Create a project directory inside your go/src/ folder. Call it myAppBy default it should be at this location:

  1. Extract the folder from the .zip file into your project directoryCopy src/myApp/PDFNetC(64)/Lib/PDFNet.dll into src/myApp/

Integrate Apryse SDK with Go

  1. In your project directory, create a new file called myApp.goAdd the following code inside:Save and close the file.Your folder should look similar to:

  1. In the project folder, run:This will produce a myApp.exe file.

  1. Run the executable file. The executable will produce a pdf with a blank page in a linearized format.

Make sure Go is installed at `/usr/local/go` and `/usr/local/go/bin`.

  • Apryse SDK for Linux

spinner
spinner
  • Get your Apryse trial key.

spinner

License Key Required

The trial of Apryse SDK requires a trial license key, which is provided in the box titled "License Key". A commercial license key is required for use in a production environment. Please contact sales to purchase a commercial key or if you need any other license key assistance.

Setup

  1. Create a project directory called myApp.

  2. Extract the PDFNetC64 package as a folder into your project directory.

Your files and folders should look similar to:

~/myApp ~/myApp/PDFNetC64 ~/myApp/PDFNetC64/Headers ~/myApp/PDFNetC64/Lib ...

Integrate Apryse SDK with Go

  1. In your project directory, create a new file called myApp.goAdd the following code inside:Save and close the file.Your files and folders should look similar to:

  1. In the project folder, run:This will produce a myApp executable file.

  1. Run the executable file. The executable will produce a pdf with a blank page in a linearized format.

Want to generate your own bindings?

You can generate bindings for Apryse SDK APIs using various methods. It is recommended to use SWIG to generate these bindings. The header files to include can be found in PDFNET_BASE\Headers\ and the library can be found in PDFNET_BASE\Lib\.

Next step

GuidesAPI docsSamples

Last updated

Was this helpful?