Print API
Use the standard Window:print() method to print from your app.
For apps running on desktop devices, print() uses the browser's built-in print dialog without any App Bridge involvement.
On Shopify Mobile and Shopify POS devices, print() doesn't work natively inside the app's iframe, so App Bridge intercepts this method. You can call print() from your code as normal, and App Bridge communicates with the Shopify Mobile or Shopify POS app to handle printing.
Anchor to Use casesUse cases
- Page printing: Print the current App Home page content from Shopify Mobile or POS devices.
- Order summaries: Print order or transaction details directly from your app on mobile devices.
- Record keeping: Let merchants print app content for physical records or documentation.
- Mobile support: Trigger the native print dialog on Shopify Mobile and Shopify POS devices.
js
Examples
Description
Call print() to print the current page. On desktop, this opens the browser's print dialog. On Shopify Mobile and Shopify POS devices, App Bridge handles the request.
js
print();Description
Trigger printing from a user action such as a button click. On mobile devices, App Bridge forwards the request to the Shopify Mobile or Shopify POS app. On desktop, the browser's built-in print dialog is used.
js
const printButton = document.getElementById('print-button'); printButton.addEventListener('click', () => { print(); });