How to Install Aspose.PDF for Go via C++

Installation

This package includes a large file which is stored as a bzip2 archive.

  1. Add the asposepdf package to Your Project:

    go get github.com/aspose-pdf/aspose-pdf-go-cpp@latest
    
  2. Generate the large file:

For macOS and linux

  1. Open Terminal

  2. List the folders of the github.com/aspose-pdf within the Go module cache:

    ls $(go env GOMODCACHE)/github.com/aspose-pdf/
    
  3. Change curent folder to the specific version folder of the package obtained in the previous step:

    cd $(go env GOMODCACHE)/github.com/aspose-pdf/aspose-pdf-go-cpp@vx.x.x
    

    Replace @vx.x.x with the actual package version.

  4. Run go generate with superuser privileges:

    sudo go generate
    

For Windows

  1. Open Command Prompt

  2. List the folders of the github.com/aspose-pdf within the Go module cache:

    for /f "delims=" %G in ('go env GOMODCACHE') do for /d %a in ("%G\github.com\aspose-pdf\*") do echo %~fa
    
  3. Change curent folder to the specific version folder of the package obtained in the previous step:

    cd <specific version folder of the package>
    
  4. Run go generate:

    go generate
    
  5. Add specific version folder of the package to the %PATH% environment variable:

    setx PATH "%PATH%;<specific version folder of the package>\lib\"
    

    Replace <specific version folder of the package> with the actual path obtained from step 2.

Testing

The test run from the root package folder:

go test -v

Quick Start

All code snippets are contained in the snippet.