--- title: PrintPreview description: >- The `PrintPreview` component displays a preview of printable content from a specified source URL. Use it to show users what will be printed before triggering the actual print operation. `PrintPreview` works in conjunction with the Print API to provide complete print functionality from preview to execution. 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. [Learn how to build a print extension in POS](/docs/apps/build/pos/build-print-extension). api_version: 2025-01 api_name: pos-ui-extensions source_url: html: >- https://shopify.dev/docs/api/pos-ui-extensions/2025-01/ui-components/navigation-and-content/printpreview md: >- https://shopify.dev/docs/api/pos-ui-extensions/2025-01/ui-components/navigation-and-content/printpreview.md --- # Print​Preview The `PrintPreview` component displays a preview of printable content from a specified source URL. Use it to show users what will be printed before triggering the actual print operation. `PrintPreview` works in conjunction with the Print API to provide complete print functionality from preview to execution. 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. [Learn how to build a print extension in POS](https://shopify.dev/docs/apps/build/pos/build-print-extension). Support Targets (6) ### Supported targets * [pos.​customer-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/customer-details#customer-details-action-modal-) * [pos.​draft-order-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/draft-order-details#draft-order-details-action-modal-) * [pos.​home.​modal.​render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/home-screen#home-screen-action-modal-) * [pos.​order-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/order-details#order-details-action-modal-) * [pos.​product-details.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/product-details#product-details-action-modal-) * [pos.​purchase.​post.​action.​render](https://shopify.dev/docs/api/pos-ui-extensions/2025-01/targets/post-purchase#post-purchase-action-modal-) #### Use cases * **Receipt previews:** Display receipt previews before printing to review transaction details. * **Document previews:** Show custom document previews for reports or labels. * **Print confirmation:** Provide print confirmation workflows to verify content accuracy. * **Template previews:** Enable preview of different formatting options or templates. ## Examples ### Preview printable content Display a preview of printable content before triggering the print operation. This example shows how to use PrintPreview with HTML documents, PDFs, images, or text files, supporting various document formats with proper rendering for receipts, invoices, and formatted reports. ## Preview printable content ![](https://shopify.dev/images/templated-apis-screenshots/pos-ui-extensions/2025-01/print-preview-default.png) ### Examples * #### Preview printable content ##### Description Display a preview of printable content before triggering the print operation. This example shows how to use PrintPreview with HTML documents, PDFs, images, or text files, supporting various document formats with proper rendering for receipts, invoices, and formatted reports. ##### React ```tsx import React from 'react'; import { Screen, reactExtension, Button, PrintPreview, useApi, } from '@shopify/ui-extensions-react/point-of-sale'; const Modal = () => { const api = useApi<'pos.home.modal.render'>(); return (