---
title: Print API
description: The Print API is deprecated. Use the Printing API for POS print flows.
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/target-apis/platform-apis/print-api
  md: >-
    https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/target-apis/platform-apis/print-api.md
api_name: pos-ui-extensions
---

# Print API

**Deprecated:**

The Print API (`shopify.print`) is deprecated. Use the [Printing API](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/target-apis/platform-apis/printing-api) (`shopify.printing`) for new print flows, including system print dialog fallback and direct receipt printer printing.

The Print API triggers the native print dialog for documents. It doesn't support direct printing to dedicated POS receipt printers.

Supported document types:

* **HTML documents** (`.html`, `.htm`) - Best printing experience with full CSS styling, embedded images, and complex layouts. Use for receipts, invoices, and formatted reports.

* **Text files** (`.txt`, `.csv`) - Plain text with basic content and tabular data support. Use for simple receipts and data exports.

* **Image files** (`.png`, `.jpg`, `.jpeg`, `.gif`, `.bmp`, `.webp`) - Common web formats with format-specific optimizations. Use for logos, charts, QR codes, and barcodes.

* **PDF files** (`.pdf`) - Behavior varies by platform: prints directly on iOS/desktop, but downloads to external viewer on Android. Use for complex documents and compliance requirements.

### Use cases

* **Custom receipts:** Print custom receipts or invoices with branded formatting.
* **Labels:** Generate and print shipping labels, return labels, or inventory documents.
* **Reports:** Create printed reports for sales analytics, inventory counts, or summaries.
* **Customer communications:** Print loyalty program info, promotional materials, or instructions.

### Support Targets (22)

### Supported targets

* [pos.​cart.​line-item-details.​action.​menu-item.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/cart-details#cart-details-targets)
* [pos.​cart.​line-item-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/cart-details#cart-details-action-modal-)
* [pos.​customer-details.​action.​menu-item.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/customer-details#customer-details-action-menu-item-)
* [pos.​customer-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/customer-details#customer-details-action-modal-)
* [pos.​customer-details.​block.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/customer-details#customer-details-targets)
* [pos.​draft-order-details.​action.​menu-item.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/draft-order-details#draft-order-details-action-menu-item-)
* [pos.​draft-order-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/draft-order-details#draft-order-details-action-modal-)
* [pos.​draft-order-details.​block.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/draft-order-details#draft-order-details-targets)
* [pos.​home.​modal.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/home-screen#home-screen-action-modal-)
* [pos.​home.​tile.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/home-screen#home-screen-targets)
* [pos.​order-details.​action.​menu-item.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/order-details#order-details-action-menu-item-)
* [pos.​order-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/order-details#order-details-action-modal-)
* [pos.​order-details.​block.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/order-details#order-details-targets)
* [pos.​product-details.​action.​menu-item.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/product-details#product-details-action-menu-item-)
* [pos.​product-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/product-details#product-details-action-modal-)
* [pos.​product-details.​block.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/product-details#product-details-targets)
* [pos.​purchase.​post.​action.​menu-item.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/post-purchase#post-purchase-action-menu-item-)
* [pos.​purchase.​post.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/post-purchase#post-purchase-action-modal-)
* [pos.​purchase.​post.​block.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/post-purchase#post-purchase-targets)
* [pos.​register-details.​action.​menu-item.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/register-details#register-details-targets)
* [pos.​register-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/register-details#register-details-action-modal-)
* [pos.​register-details.​block.​render](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc/targets/register-details#register-details-block-)

### Properties

The [`shopify` global object](https://shopify.dev/docs/api/pos-ui-extensions/2026-10-rc#target-apis-define-what-your-extension-does) provides methods for triggering document printing. Access the following properties on `shopify` to initiate print operations with HTML, text, image, and PDF document types.

* **print**

  **(src: string) => Promise\<void>**

  **required**

  Triggers a print dialog for the specified document source. The `print()` method accepts 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)

  • A full URL to your app's backend that will be used to return the document to print

  Returns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports.

Examples

### Examples

* ####

  ##### Description

  Trigger the native print dialog from a smart grid tile action. This example shows how to use \`shopify.print()\` to print a document specified by a relative path. This allows quick printing of receipts, labels, or reports directly from the POS home screen.

  ##### jsx

  ```tsx
  import {render} from 'preact';

  export default async () => {
    render(<Extension />, document.body);
  };

  const Extension = () => {
    return (
      <s-tile
        heading="My app"
        subheading="Hello world!"
        onClick={() => {
          shopify.print.print('documents/test-print');
        }}
      />
    );
  };
  ```

* ####

  ##### Description

  Print documents hosted on external servers using full URLs. This example shows how to use \`shopify.print()\` with a complete URL to print remotely hosted documents. This enables dynamic content generation or printing from external services.

  ##### jsx

  ```tsx
  import {render} from 'preact';

  export default async () => {
    render(<Extension />, document.body);
  };

  const Extension = () => {
    return (
      <s-tile
        heading="My App"
        subheading="Print with full URL"
        onClick={async () => {
          // Using a full URL directly
          await shopify.print.print('https://my-print-service.com/api/print/document');
        }}
      />
    );
  };
  ```

* ####

  ##### Description

  Print documents using relative paths within your extension bundle. This example demonstrates using \`shopify.print()\` with a relative path to reference HTML, text, image, or PDF files included in your extension. This makes it easy to print pre-defined templates or documents.

  ##### jsx

  ```tsx
  import {render} from 'preact';

  export default async () => {
    render(<Extension />, document.body);
  };

  const Extension = () => {
    return (
      <s-tile
        heading="My App"
        subheading="Print with relative path"
        onClick={async () => {
          // If your application_url is "https://my-app.com"
          // This will resolve to "https://my-app.com/api/print/document"
          await shopify.print.print('/api/print/document');
        }}
      />
    );
  };
  ```

***

## Best practices

* **Use appropriate document formats:** Choose HTML for rich formatting and responsive design, text for simple content, images for graphics, and PDFs for complex documents while considering platform limitations.
* **Handle printing errors gracefully:** Implement proper error handling for print operations, including network failures, unsupported document types, or printer connectivity issues.
* **Optimize documents for printing:** Design your printable documents with appropriate sizing, margins, and formatting that work well with printers and standard paper sizes.
* **Provide user feedback:** Give users clear feedback about print operations, including loading states, success confirmations, and error messages when printing fails.

***

## Limitations

* PDF printing on Android devices requires downloading the file and using an external application, which may interrupt the user workflow.
* Receipt printers aren't supported. The Print API triggers the device's native print dialog for standard system printers and can't print directly to dedicated POS receipt printers.

***
