Files
Nathan Muggli 37b9846f69 Add roll printing sample (#1006)
* Add roll printing sample

* Copied heavily from existing printing sample

* Changed functionality from existing printing sample as follows:

* Only display printers that support roll printing
* In table, create a row for each unique width for each printer

* Fix wording in README

* Update readme to list a milestone for bug to get fixed

* Update api-samples/printing/roll-printing/README.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/printing/README.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Convert a function call to a promise.

* Clean up a few errors setting element IDs.

Remove the main cancel button that is no longer used.  Instead, the
cancel button that gets created in the print job table is the one that
should be used.

* Consolidate the roll-printing sample with the regular sample

There is now a checkbox on the main UI to select roll printers or all
printers.  For roll printing, this sample now demonstrates how to check
if the printer is capable of roll printing, if the printer is capable of
trimming the paper after printing, and how the media length can be a
variable value.

* Update api-samples/printing/README.md

Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>

* Update api-samples/printing/printers.js

Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>

* Simplify fuction to use find instead of filter

Update README to link to roll printing info.

* Use new page instead of popup

* Update api-samples/printing/README.md

Co-authored-by: Joe Medley <jmedley@google.com>

---------

Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>
2023-11-21 13:22:52 +00:00

55 lines
1.4 KiB
HTML

<!--
* Copyright 2020 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<!DOCTYPE html>
<html>
<head>
<title>Printers</title>
<link href="printers.css" rel="stylesheet" type="text/css" />
<script src="printers.js"></script>
</head>
<body>
<h2>Print Job:</h2>
<p>On some systems, the print job may leave the queue too quickly to be visible in this list.</p>
<div id="printJob">
<table id="printJobTable">
<thread>
<tr>
<th>Cancel</th>
<th>Job Id</th>
<th>Status</th>
</tr>
</thread>
<tbody id="printJobTbody"></tbody>
</table>
</div>
<h2>Printers:</h2>
<div id="printers">
<input type='checkbox' id='rollPrinters' name='rollPrinters'>
<label for='rollPrinters'>Roll Printers</label>
<table id="printersTable">
<thead>
<tr>
<th>Print</th>
<th>Id</th>
<th>Name</th>
<th>Description</th>
<th>URI</th>
<th>Source</th>
<th>Default</th>
<th>Recently used</th>
<th>Capabilities</th>
<th>Supports trim</th>
<th>Status</th>
</tr>
</thead>
<tbody id="tbody"/>
</table>
</div>
</body>
</html>