* Set the document title. * * @param title - The document title * @param options - Additional options (e.g., showInWindowTitleBar) * * @example * ```typescript * pdf.setTitle("Quarterly Report Q4 2024"); * * // Show title in viewer's title bar instead of filename * pdf.
(title: string, options?: SetTitleOptions)
| 1086 | * ``` |
| 1087 | */ |
| 1088 | setTitle(title: string, options?: SetTitleOptions): void { |
| 1089 | this.getInfoDict().set("Title", PdfString.fromString(title)); |
| 1090 | |
| 1091 | if (options?.showInWindowTitleBar) { |
| 1092 | this.getOrCreateViewerPreferences().set("DisplayDocTitle", PdfBool.of(true)); |
| 1093 | } |
| 1094 | } |
| 1095 | |
| 1096 | /** |
| 1097 | * Get the document author. |
no test coverage detected