---
Product: Aspose.PDF
Platform: go
Page Type: docs
Canonical URL: https://docs.aspose.org/pdf/go/getting-started/installation
---

# Installation

How to add Aspose.PDF FOSS for Go to a Go module project using go get, verify the installation, and confirm the runtime requirement of Go 1.24+.

## Overview

This page explains how to add Aspose.PDF FOSS for Go to an existing Go module project.

---

### Prerequisites

| Requirement | Detail |
|---|---|
| Go version | 1.24 or later (`go version` must print `go1.24` or higher) |
| Module mode | Project must be a Go module (`go.mod` present) |
| Network access | `go get` fetches from GitHub; proxy or `GONOSUMCHECK` may be needed in air-gapped envs |

---

### Step 1 — Initialise a Go module (if needed)

If your project does not yet have a `go.mod`, initialise one first:

```bash
go mod init your-module-name
```

---

### Step 2 — Add the dependency

Run `go get` to fetch and record the module:

```bash
go get github.com/aspose-pdf-foss/aspose-pdf-foss-for-go
```

This updates `go.mod` and `go.sum`. The module path is
`github.com/aspose-pdf-foss/aspose-pdf-foss-for-go`.

---

### Step 3 — Import and verify

Create a minimal `main.go` to confirm the import resolves:

```go
package main

import (
	"fmt"
	pdf "github.com/aspose-pdf-foss/aspose-pdf-foss-for-go"
)

func main() {
	doc := pdf.NewDocumentFromFormat(pdf.PageFormatA4)
	if err := doc.Save("verify.pdf"); err != nil {
		panic(err)
	}
	fmt.Println("verify.pdf written â€” installation OK")
}
```

Run it:

```bash
go run main.go
```

A `verify.pdf` file in the current directory confirms the installation is working.

---

### Step 4 — Tidy the module graph

After confirming the import, run `go mod tidy` to remove any unused dependencies
that may have been introduced:

```bash
go mod tidy
```

---

### Next Steps

- [Quick Start](../quickstart/) — open an existing PDF and perform a first operation
- [License](../license/) — MIT license terms and attribution requirements
- [Developer Guide](../../developer-guide/) — feature-level documentation

## See Also

- [Aspose.PDF — Enterprise Documentation](https://docs.aspose.com/pdf/)