How to Install Aspose.PDF for Go via C++
Contents
[
Hide
]
Installation
This package includes a large file which is stored as a bzip2 archive.
- Add the asposepdf package to Your Project:
go get github.com/aspose-pdf/aspose-pdf-go-cpp@latest
- Generate the large file:
- macOS and linux
-
Open Terminal
-
List the folders of the github.com/aspose-pdf within the Go module cache:
ls $(go env GOMODCACHE)/github.com/aspose-pdf/
- 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.
- Run go generate with superuser privileges:
sudo go generate
- Windows
-
Open Command Prompt
-
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
- Change curent folder to the specific version folder of the package obtained in the previous step:
cd <specific version folder of the package>
- Run go generate:
go generate
- 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.