forked from GoogleChrome/chrome-extensions-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add printer status listener. * Show printer status in popup. * Fix Status display. * Implement cancelJob(). * Correct script typos. * Add important keyword to CSS. * Refactor element pointers. * Rewrite callbacks to promises. * Fix CSS. * Fix variable name. * Move Print button to front of line. * Restore old style of submitJob(). * Fix bugs. * adding print job table along with cancel button (GoogleChrome#847) * adding print job table along with cancel button * make cancel button hidden conditionally and scroll to buttom after print button is clicked * Fix spelling. * Update api-samples/printing/printers.js * Add README file. * Readme corrections. * Update api-samples/printing/README.md * Update api-samples/printing/README.md * Update api-samples/printing/README.md * Create an addCell() function. * Fix position of addCell(). * Rearange popup layout. * More rearranging. * Add a warning about the print job table. * Feedback from Patrick. * Lint and update strings. --------- Co-authored-by: rayxu-google <[email protected]>
- Loading branch information
1 parent
0c7e9b6
commit d7f3d83
Showing
3 changed files
with
99 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# chrome.printing | ||
|
||
This sample demonstrates all four methods of the `chrome.printing` namespace. | ||
|
||
## Overview | ||
|
||
The `chrome.printing` namespace only works on ChromeOS. The sample demonstrates how to get a list of available printers and display it to a user. A 'Print' button sends a sample PDF to the selected printer and makes a 'Cancel Printing' visible. This button is visible while the print job's status is `"PENDING"` or `"IN_PROGRESS"`. Note that on some systems, the print job is passed to the printer so quickly that you may never see the 'Cancel Printing' button. | ||
|
||
If the extension is not listed in [`PrintingAPIExtensionsAllowlist`](https://chromeenterprise.google/policies/#PrintingAPIExtensionsAllowlist) policy, the user will be prompted to accept the print job. | ||
|
||
## Implementation Notes | ||
|
||
Note that the `submitJob()` function throws an error when returning a promise ([crbug: 1422837](https://bugs.chromium.org/p/chromium/issues/detail?id=1422837)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters