Fix api formatting docs
All checks were successful
Build and Deploy MkDocs / build-next (push) Successful in 47s
All checks were successful
Build and Deploy MkDocs / build-next (push) Successful in 47s
This commit is contained in:
parent
f117a3d70c
commit
1671f19bc2
@ -17,6 +17,8 @@ Get a list of document scanners found on the network. Supports eSCL/AirPrint.
|
|||||||
**Kind**: static method of [<code>documentscanner</code>](#documentscanner)
|
**Kind**: static method of [<code>documentscanner</code>](#documentscanner)
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
|
await global.apis.documentscanner.discoverScanners();
|
||||||
|
// Returns:
|
||||||
[{
|
[{
|
||||||
protocol: "http",
|
protocol: "http",
|
||||||
host: "ip or hostname",
|
host: "ip or hostname",
|
||||||
@ -42,5 +44,17 @@ Scan a document to PDF. Supports eSCL/AirPrint.
|
|||||||
| Param | Type | Description |
|
| Param | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| scannerObj | <code>Object</code> | A scanner object from discoverScanners() |
|
| 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. |
|
| opts | <code>Object</code> | Scanning options |
|
||||||
|
|
||||||
|
**Example**
|
||||||
|
```js
|
||||||
|
var pdfBlob = await global.apis.documentscanner.scanToPDF(await discoverScanners()[0], {
|
||||||
|
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.
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user