---
title: "init(url:)"
framework: pdfkit
role: symbol
role_heading: Initializer
path: "pdfkit/pdfdocument/init(url:)-98jte"
---

# init(url:)

Initializes a PDFDocument object with the contents at the specified URL (if the URL is invalid, this method returns NULL).

## Declaration

```swift
init?(url: URL)
```

## Return Value

Return Value A PDFDocument instance initialized with the data at the passed-in URL or NULL if the object could not be initialized or if the URL is invalid.

## See Also

### Initializing Documents

- [init(data:)](pdfkit/pdfdocument/init(data:).md)
- [init()](pdfkit/pdfdocument/init().md)
