
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
@bcyesil/capacitor-plugin-printer
Advanced tools
Capacitor plugin for printing HTML format value iOS/Android apps.
@bcyesil/capacitor-plugin-printer
Capacitor plugin for printing HTML, plain text, and images in iOS/Android apps. Supports additional features like Base64 PDF and image printing (from v0.0.5).
Printer.print({ content: '<b>Lorem ipsum...</b>'})
Capacitor Version | Plugin Version |
---|---|
v5.x | v0.0.3 |
v6.x | v0.0.4+ |
npm install @bcyesil/capacitor-plugin-printer
npx cap sync
import { Printer } from '@bcyesil/capacitor-plugin-printer';
.
.
.
Printer.print({ content: 'Lorem ipsum...', name: 'lorem-filename', orientation: 'landscape' })
Text:
Printer.print({ content: 'Lorem ipsum...'})
HTML:
Printer.print({ content: '<h1>Lorem</h1>'})
Printing multiple HTML elements:
let contentTest: string = "";
contentTest += '<li style="color:green">Tea</li>'
contentTest += '<li style="font-size:50px">Coffee</li>'
contentTest += '<img src="https://picsum.photos/200">'
Printer.print({ content: contentTest })
Images with HTML:
Printer.print({ content: '<img src="base64/url/path">'})
with inline CSS:
Printer.print({ content: '<b style="color:red">Lorem ipsum</b>'})
Base64:
// (since v0.0.5)
// Base64 decoder supports Plain text(just the Base64 value) & Data URI(data:content/type;base64)
Printer.print({ content: 'base64:...'})
print(printOptions: PrintOptions) => Promise<void>
Param | Type |
---|---|
printOptions | PrintOptions |
Prop | Type | Description | Default | Since |
---|---|---|---|---|
content | string | HTML content for print. | 0.0.1 | |
name | string | Name of the print of the document. | iOS=YourAppName/Android=Document+CurrentTimestamp | 0.0.1 |
orientation | string | Orientation of the printing page. "portrait" or "landscape" | "portrait" | 0.0.1 |
FAQs
Capacitor plugin for printing HTML format value iOS/Android apps.
The npm package @bcyesil/capacitor-plugin-printer receives a total of 1,211 weekly downloads. As such, @bcyesil/capacitor-plugin-printer popularity was classified as popular.
We found that @bcyesil/capacitor-plugin-printer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.