From c22f94037a6f1437f51549ef085dab09882598ea Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 4 Jun 2025 14:09:24 +0200 Subject: [PATCH] docs: document possible print `failureReason`s (#47337) docs: document possible print failureReasons --- docs/api/web-contents.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 05a9ad382418..5916ed07c5ce 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -1726,6 +1726,12 @@ When a custom `pageSize` is passed, Chromium attempts to validate platform speci Prints window's web page. When `silent` is set to `true`, Electron will pick the system's default printer if `deviceName` is empty and the default settings for printing. +Some possible `failureReason`s for print failure include: + +* "Invalid printer settings" +* "Print job canceled" +* "Print job failed" + Use `page-break-before: always;` CSS style to force to print to a new page. Example usage: