---
title: "getVersion(majorVersion:minorVersion:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgpdfdocument/getversion(majorversion:minorversion:)"
---

# getVersion(majorVersion:minorVersion:)

Returns the major and minor version numbers of a Core Graphics PDF document.

## Declaration

```swift
func getVersion(majorVersion: UnsafeMutablePointer<Int32>, minorVersion: UnsafeMutablePointer<Int32>)
```

## Parameters

- `majorVersion`: On return, contains the major version number of the document.
- `minorVersion`: On return, contains the minor version number of the document.

## Discussion

Discussion On return, the values of the majorVersion and minorVersion parameters are set to the major and minor version numbers of the document respectively.

## See Also

### Examining a PDF Document

- [catalog](coregraphics/cgpdfdocument/catalog.md)
- [fileIdentifier](coregraphics/cgpdfdocument/fileidentifier.md)
- [info](coregraphics/cgpdfdocument/info.md)
- [numberOfPages](coregraphics/cgpdfdocument/numberofpages.md)
- [page(at:)](coregraphics/cgpdfdocument/page(at:).md)
