PostalPoint_Plugins/docs/Plugin API/documentscanner.md
Skylar Ittner f117a3d70c
All checks were successful
Build and Deploy MkDocs / build-next (push) Successful in 1m0s
Update API docs
2026-04-08 19:15:56 -06:00

2.3 KiB

documentscanner : object

Scan documents from flatbed/ADF scanners.

Kind: global namespace

documentscanner.discoverScanners() ⇒ Promise.<Array>

Get a list of document scanners found on the network. Supports eSCL/AirPrint.

Kind: static method of documentscanner
Example

[{
         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
         }]

documentscanner.scanToPDF(scannerObj, opts) ⇒ Promise.<Blob>

Scan a document to PDF. Supports eSCL/AirPrint.

Kind: static method of documentscanner
Returns: Promise.<Blob> - PDF file.

Param Type Description
scannerObj Object A scanner object from discoverScanners()
opts Object Scanning options: dpi?: number, // default 300 colorMode?: string, // "RGB24"