* Get all document metadata. * * @returns Object containing all metadata fields * * @example * ```typescript * const metadata = pdf.getMetadata(); * console.log(`Title: ${metadata.title}`); * console.log(`Author: ${metadata.author}`); * ```
()
| 1445 | * ``` |
| 1446 | */ |
| 1447 | getMetadata(): DocumentMetadata { |
| 1448 | return { |
| 1449 | title: this.getTitle(), |
| 1450 | author: this.getAuthor(), |
| 1451 | subject: this.getSubject(), |
| 1452 | keywords: this.getKeywords(), |
| 1453 | creator: this.getCreator(), |
| 1454 | producer: this.getProducer(), |
| 1455 | creationDate: this.getCreationDate(), |
| 1456 | modificationDate: this.getModificationDate(), |
| 1457 | trapped: this.getTrapped(), |
| 1458 | language: this.getLanguage(), |
| 1459 | }; |
| 1460 | } |
| 1461 | |
| 1462 | /** |
| 1463 | * Set multiple metadata fields at once. |
no test coverage detected