printer plugin for capacitor
npm install @rdlabo/capacitor-printer
npx cap syncprintFile(options: PrintFileOptions) => Promise<void>Present the printing user interface to print a file.
The promise settles after the operating system no longer needs the source
file, so the file can be safely deleted in a finally block.
Only available on Android and iOS.
| Param | Type |
|---|---|
options |
PrintFileOptions |
printWebView(options?: PrintOptions | undefined) => Promise<void>Present the printing user interface to print the web view content.
| Param | Type |
|---|---|
options |
PrintOptions |
| Prop | Type | Description |
|---|---|---|
path |
string |
The path to the file. Android supports file paths, file:// URLs, and content:// URLs. iOS supports file paths and local file:// URLs. |
mimeType |
string |
The MIME type of the file. Only used on Android. |
| Prop | Type | Description | Default |
|---|---|---|---|
name |
string |
The name of the print job. | 'Document' |