The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

DocumentScanner API

Scan documents from a Lightning web component.

The Syntax sections in the following topics use TypeScript formatting. We use this formatting to make the API syntax easier to understand. For example, functions can be described by the function name, parameter name and type, and a return type like this.

Optional parameters are appended with ? like objectInfo?: ObjectInfo. For more information, see the TypeScript Handbook.

Other sections beside the Syntax sections are written in JavaScript. Lightning web components don’t support TypeScript. You must write your code in JavaScript.

For more information about how DocumentScanner works, see Scan Documents on a Mobile Device.