Skip to content

Commit

Permalink
allow the document language to be specified (#2453)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yle authored and liborm85 committed Dec 31, 2023
1 parent e31bd46 commit 732ef54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/styling_inlines.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ var docDefinition = {
fontSize: 15,
italics: true
}
}
},
language: "en-AU"
};

var pdfDoc = printer.createPdfKitDocument(docDefinition);
Expand Down
1 change: 1 addition & 0 deletions src/printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ PdfPrinter.prototype.createPdfKitDocument = function (docDefinition, options) {
userPassword: docDefinition.userPassword,
ownerPassword: docDefinition.ownerPassword,
permissions: docDefinition.permissions,
lang: docDefinition.language,
fontLayoutCache: isBoolean(options.fontLayoutCache) ? options.fontLayoutCache : true,
bufferPages: options.bufferPages || false,
autoFirstPage: false,
Expand Down

0 comments on commit 732ef54

Please sign in to comment.