--- title: Print API description: >- The Print API enables document printing through the device's native print dialog (such as AirPrint on iOS or the system print dialog on Android). This API is designed for printing documents to standard printers, and does not support direct printing to receipt printers. api_version: 2025-04 api_name: pos-ui-extensions source_url: html: 'https://shopify.dev/docs/api/pos-ui-extensions/2025-04/apis/print-api' md: 'https://shopify.dev/docs/api/pos-ui-extensions/2025-04/apis/print-api.md' --- # Print APIAPIs The Print API enables document printing through the device's native print dialog (such as AirPrint on iOS or the system print dialog on Android). This API is designed for printing documents to standard printers, and does not support direct printing to receipt printers. ## PrintApi Interface for handling print operations * print (src: string) => Promise\ required Trigger a print dialog. The src must be either: * A relative path that will be appended to your app's [application\_url](https://shopify.dev/docs/apps/build/cli-for-apps/app-configuration#application_url) * A full URL to your app's backend that will be used to return the document to print Supported document types: * HTML documents (recommended for best printing experience) * Text files * Image files (PNG, JPEG, etc.) * PDF files (Note: On Android devices, PDFs will be downloaded and must be printed using an external application) ## Examples Examples of using the Print API Print directly from the tile Print with relative path Print with full URL ### Examples * #### Print directly from the tile ##### React ```tsx import React from 'react'; import { Tile, reactExtension, useApi, } from '@shopify/ui-extensions-react/point-of-sale'; const TileComponent = () => { const api = useApi(); return ( { api.print.print('documents/test-print'); }} enabled /> ); }; export default reactExtension('pos.home.tile.render', () => { return ; }); ``` ##### TS ```ts import {Tile, extension} from '@shopify/ui-extensions/point-of-sale'; export default extension('pos.home.tile.render', (root, api) => { const tile = root.createComponent(Tile, { title: 'My app', subtitle: 'Hello world!', enabled: true, onPress: () => { api.print.print('/documents/test-print'); }, }); root.append(tile); }); ``` * #### Print with relative path ##### React ```tsx // If your application_url is "https://my-app.com" // This will resolve to "https://my-app.com/api/print/document" await print.print('/api/print/document'); ``` * #### Print with full URL ##### React ```tsx // Using a full URL directly await print.print('https://my-print-service.com/api/print/document'); ``` ## Related [Preview documents before printing - PrintPreview Component](https://shopify.dev/api/pos-ui-extensions/components/printpreview) [Learn how to implement printing - Build a Print Extension](https://shopify.dev/docs/api/pos-ui-extensions/examples/print-extension)