# PDFDocument.metadata

```ts
get metadata(): DocumentMetadata
```

Title, author, subject, creator, keywords, producer, creationDate, modifiedDate. `modifiedDate` is the file's modification date, which a save sets — the saved copy's; the open document's stays what the file said.

Without the `extract` feature the six strings are `''`.

- Kind: getter
- Since: 1.0.0

Returns `DocumentMetadata`: `title`, `author`, `subject`, `keywords` (as the file lists them, one string), `creator` (the application that produced the document), `producer` (the application that wrote the file), `creationDate` and `modifiedDate` (`Date | null`, `null` when the file does not say).

Throws:

- `DOCUMENT_CLOSED` — read on a closed document.

```ts
document.title = doc.metadata.title || file.name;
```

Part of [PDFDocument](https://kernstra.com/docs/web-sdk/api/pdfdocument) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/pdfdocument/metadata
