Update API docs
All checks were successful
Build and Deploy MkDocs / build-next (push) Successful in 1m0s
All checks were successful
Build and Deploy MkDocs / build-next (push) Successful in 1m0s
This commit is contained in:
parent
027121ca6a
commit
f117a3d70c
46
docs/Plugin API/documentscanner.md
Normal file
46
docs/Plugin API/documentscanner.md
Normal file
@ -0,0 +1,46 @@
|
||||
<a name="documentscanner"></a>
|
||||
|
||||
## documentscanner : <code>object</code>
|
||||
Scan documents from flatbed/ADF scanners.
|
||||
|
||||
**Kind**: global namespace
|
||||
|
||||
* [documentscanner](#documentscanner) : <code>object</code>
|
||||
* [.discoverScanners()](#documentscanner.discoverScanners) ⇒ <code>Promise.<Array></code>
|
||||
* [.scanToPDF(scannerObj, opts)](#documentscanner.scanToPDF) ⇒ <code>Promise.<Blob></code>
|
||||
|
||||
<a name="documentscanner.discoverScanners"></a>
|
||||
|
||||
### documentscanner.discoverScanners() ⇒ <code>Promise.<Array></code>
|
||||
Get a list of document scanners found on the network. Supports eSCL/AirPrint.
|
||||
|
||||
**Kind**: static method of [<code>documentscanner</code>](#documentscanner)
|
||||
**Example**
|
||||
```js
|
||||
[{
|
||||
protocol: "http",
|
||||
host: "ip or hostname",
|
||||
port: 80,
|
||||
rs: "eSCL",
|
||||
uuid: "1234etc",
|
||||
icon: "http://hostname/icon.png", // Icon supplied by the scanner to represent itself visually to the user.
|
||||
name: "ScanTron 9000",
|
||||
note: "", // Whatever is set as the scanner's human-readable location in its settings
|
||||
hasAdf: true, // Has an automatic document/page feeder
|
||||
hasPlaten: true, // Has a flatbed
|
||||
hasDuplex: false // Can do automatic duplex scanning
|
||||
}]
|
||||
```
|
||||
<a name="documentscanner.scanToPDF"></a>
|
||||
|
||||
### documentscanner.scanToPDF(scannerObj, opts) ⇒ <code>Promise.<Blob></code>
|
||||
Scan a document to PDF. Supports eSCL/AirPrint.
|
||||
|
||||
**Kind**: static method of [<code>documentscanner</code>](#documentscanner)
|
||||
**Returns**: <code>Promise.<Blob></code> - PDF file.
|
||||
|
||||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| scannerObj | <code>Object</code> | A scanner object from discoverScanners() |
|
||||
| opts | <code>Object</code> | Scanning options: dpi?: number, // default 300 colorMode?: string, // "RGB24" | "Grayscale8" | "BlackAndWhite1", default "RGB24" source?: string, // Where the document is physically located: "Platen" or "Feeder". Default is "Feeder" (if scanner has one and it isn't empty) or unset (so scanner can autodetect media). intent?: string, // default is unset. "Document" | "TextAndGraphic" | "Photo" | "Preview" duplex?: boolean, // default true if the scanner supports it. scanHeight?: number, // Height in inches. Default 11. scanWidth?: number // Width in inches. Default 8.5. |
|
||||
|
||||
@ -16,7 +16,7 @@ Add, modify, and delete mailboxes and mailbox customers.
|
||||
* [.deleteMailbox(number)](#mailboxes.deleteMailbox) ⇒ <code>Promise</code>
|
||||
* [.closeMailbox(number)](#mailboxes.closeMailbox) ⇒ <code>Promise</code>
|
||||
* [.mailboxExists(number)](#mailboxes.mailboxExists) ⇒ <code>Promise.<boolean></code>
|
||||
* [.addOrUpdateBoxholder(boxNumber, info)](#mailboxes.addOrUpdateBoxholder) ⇒ <code>Promise</code>
|
||||
* [.addOrUpdateBoxholder(boxNumber, info, setPrimary)](#mailboxes.addOrUpdateBoxholder) ⇒ <code>Promise</code>
|
||||
* [.removeBoxholder(boxNumber, uuid)](#mailboxes.removeBoxholder) ⇒ <code>Promise</code>
|
||||
* [.get1583(boxNumber, uuid, archiveNumber)](#mailboxes.get1583) ⇒ <code>Promise.<FormPS1583></code>
|
||||
* [.set1583(boxNumber, uuid, formps1583)](#mailboxes.set1583) ⇒ <code>Promise</code>
|
||||
@ -158,7 +158,7 @@ Returns true if the mailbox number exists, false if it doesn't.
|
||||
|
||||
<a name="mailboxes.addOrUpdateBoxholder"></a>
|
||||
|
||||
### mailboxes.addOrUpdateBoxholder(boxNumber, info) ⇒ <code>Promise</code>
|
||||
### mailboxes.addOrUpdateBoxholder(boxNumber, info, setPrimary) ⇒ <code>Promise</code>
|
||||
Modify or add a boxholder to a mailbox. info is the boxholder structure below.
|
||||
If the uuid given already belongs to a boxholder, their info is updated with what you supply.
|
||||
Otherwise, the info is added as a new boxholder.
|
||||
@ -169,6 +169,7 @@ Otherwise, the info is added as a new boxholder.
|
||||
| --- | --- | --- |
|
||||
| boxNumber | <code>string</code> | Mailbox number |
|
||||
| info | <code>Object</code> | Boxholder information. |
|
||||
| setPrimary | <code>Boolean</code> \| <code>undefined</code> | If true, this boxholder will become the primary boxholder. Default is false. |
|
||||
|
||||
**Example**
|
||||
```js
|
||||
|
||||
@ -236,6 +236,8 @@ if (type == "html") {
|
||||
|
||||
### ui.collectSignatureFromCustomerScreen(title, terms, termstype)
|
||||
Show a signature pad on the customer-facing display.
|
||||
Signature pad may appear on main employee display in some hardware configurations
|
||||
(for example, no customer display and main screen is touch-capable).
|
||||
When the customer indicates the signature is finished,
|
||||
the customerSignatureCollected event is emitted with the data
|
||||
{"svg": "data:image/svg+xml;base64,...", "png": "data:image/png;base64,..."}
|
||||
@ -281,10 +283,14 @@ global.apis.ui.clearSignaturePad();
|
||||
|
||||
### ui.getCustomerDisplayInfo() ⇒ <code>Object</code>
|
||||
Describes if the customer-facing display is currently enabled,
|
||||
and if it supports customer touch interaction.
|
||||
and if it supports customer touch interaction, and if it's possible to
|
||||
get a signature via `collectSignatureFromCustomerScreen()`.
|
||||
Note that it may be possible to get a signature even if `enabled` and/or `touch` are `false`,
|
||||
because if the main PostalPoint display is on a touch-capable monitor, a signature popup
|
||||
will be displayed there instead of on the customer screen.
|
||||
|
||||
**Kind**: static method of [<code>ui</code>](#ui)
|
||||
**Returns**: <code>Object</code> - {"enabled": true, "touch": true}
|
||||
**Returns**: <code>Object</code> - {"enabled": true, "touch": true, "signature": true}
|
||||
**Example**
|
||||
```js
|
||||
var info = global.apis.ui.getCustomerDisplayInfo();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user