This page describes how to use the Pdfcrowd online API to join multiple PDF files or update PDF attributes in Golang. The API is user-friendly and can be integrated into your application with just a few lines of code.
go get github.com/pdfcrowd/pdfcrowd-go
Check out other installation options.
Here are Golang examples for quickly getting started with the API. See more examples.
The credentials to access the API are your Pdfcrowd username and the API key. You can try out the API without registering using the following demo credentials:
It is recommended that you implement error handling to catch errors that the API may return, see the example code below. A list of status codes and their description can be found here.
// call the API // print the error os.Stderr.WriteString(fmt.Sprintf("Pdfcrowd Error: %s\n", why)) // print the error code os.Stderr.WriteString(fmt.Sprintf("Pdfcrowd Error Code: %v\n", why.getCode())) // print the error message os.Stderr.WriteString(fmt.Sprintf("Pdfcrowd Error Message: %v\n", why.getMessage()))
Refer to the PDF to PDF Golang Reference for a description of all API methods.