You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Customize image styles.Width and height can override options.imageWidth and options.imageHeight.Transform will cause rotateType to become invalid.
show
boolean
false
Whether to display preview.For debugging.
silent
boolean
false
Whether to enable silent printing.
Events
Description
webview-ready(webview)
The webview for the user to render the printed content is ready,And return the dom of the webview.
get-printer-list(data: Array)
Return printer list data.Maybe setPrinterName method can use it.
webview-render-begin
Print content starts to render.
webview-render-finish
The printed content is rendered.
start-printing(state: Boolean)
Start printing, and return whether to start printing normally.
Methods
print([src,base64]:String) - Set print picture src(The absolute path of the local picture or the address of the online picture) or base64 to trigger print automatically.
setPrinterName(name:String, callBack(err)) - Set the printer device name.If you don't want to use the default printer, you can use it.If err in callBack is not empty, it means the setting failed.