---
title: endPDFPage()
framework: coregraphics
role: symbol
role_heading: Instance Method
path: coregraphics/cgcontext/endpdfpage()
---

# endPDFPage()

Ends the current page in the PDF graphics context.

## Declaration

```swift
func endPDFPage()
```

## Discussion

Discussion You can call endPDFPage() only after you call the function beginPDFPage(_:).

## See Also

### Managing a PDF Graphics Context

- [beginPDFPage(_:)](coregraphics/cgcontext/beginpdfpage(_:).md)
- [addDestination(_:at:)](coregraphics/cgcontext/adddestination(_:at:).md)
- [setDestination(_:for:)](coregraphics/cgcontext/setdestination(_:for:).md)
- [setURL(_:for:)](coregraphics/cgcontext/seturl(_:for:).md)
- [addDocumentMetadata(_:)](coregraphics/cgcontext/adddocumentmetadata(_:).md)
- [closePDF()](coregraphics/cgcontext/closepdf().md)
