The issue is whether Shopify’s new admin print extension can preview/print PDF endpoints, not only HTML endpoints. Shopify staff confirmed PDF endpoints should be supported and shared a working Remix loader example returning a PDF buffer with Content-Type: application/pdf and Content-disposition: inline; filename="generated.pdf", wrapped with CORS handling.
The original implementation also returns a base64-decoded buffer with similar headers, but the PDF preview does not render correctly in the admin dialog. Screenshots and code snippets are central to the troubleshooting.
Recent updates indicate the problem may be browser-specific: PDFs served this way are reported to work in Firefox and Edge, but Chrome blocks or fails to render them. Multiple participants confirm the issue still persists, including with the newest Admin Print API.
No resolution has been reached. The open question is why Chrome blocks the PDF in the admin print flow and whether Shopify needs to adjust the extension/API behavior or document a required endpoint structure.
We are trying to invoke printing from the new admin print extension. We have an endpoint that is returning a PDF content and we would like to print and preview it directly in the admin dialog (same as HTML endpoint). Is it possible, or we have to preview/print only HTML endpoints?
@Liam Could you please provide more details or examples on how the endpoint should be structured from the admin UI extensions team? Currently, I need help getting it to work for me.
We came up with a simple, somewhat contrived, example so we could make our Remix app do basically the same thing that you have in your example, with the same headers and the same Base64 encoding.