MCPcopy Create free account
hub / github.com/LibPDF-js/core / setCreationDate

Method setCreationDate

src/api/pdf.ts:1318–1320  ·  view source on GitHub ↗

* Set the document creation date. * * @param date - The date the document was created * * @example * ```typescript * pdf.setCreationDate(new Date()); * ```

(date: Date)

Source from the content-addressed store, hash-verified

1316 * ```
1317 */
1318 setCreationDate(date: Date): void {
1319 this.getInfoDict().set("CreationDate", PdfString.fromString(formatPdfDate(date)));
1320 }
1321
1322 /**
1323 * Get the document modification date.

Callers 4

setMetadataMethod · 0.95
pdf.test.tsFile · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 4

getInfoDictMethod · 0.95
formatPdfDateFunction · 0.90
setMethod · 0.45
fromStringMethod · 0.45

Tested by

no test coverage detected