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

Method setLanguage

src/api/pdf.ts:1431–1433  ·  view source on GitHub ↗

* Set the document language. * * Note: Unlike other metadata, language is stored in the Catalog, not Info. * * @param language - RFC 3066 language tag (e.g., "en-US", "de-DE") * * @example * ```typescript * pdf.setLanguage("en-US"); * ```

(language: string)

Source from the content-addressed store, hash-verified

1429 * ```
1430 */
1431 setLanguage(language: string): void {
1432 this.ctx.catalog.getDict().set("Lang", PdfString.fromString(language));
1433 }
1434
1435 /**
1436 * Get all document metadata.

Callers 5

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

Calls 3

getDictMethod · 0.65
setMethod · 0.45
fromStringMethod · 0.45

Tested by

no test coverage detected