Custom Print Button Extension for Shopify Customer Account Order Items

Hi everyone,

I’m currently working on customizing the Shopify customer account area and need some advice. My goal is to create a custom button extension on the customer-account.order.action.menu-item.render

that, when clicked, prints a custom HTML snippet. I’ve reviewed the Shopify documentation on extensions and attempted a few approaches, but I’m still facing challenges getting the desired functionality.

Here are some details:

Objective: Add a button to the customer account order items section that prints custom HTML.
Current Status: I've experimented with various techniques outlined in the documentation, yet the integration isn't behaving as expected.
Questions:
    Has anyone successfully implemented a custom button that prints custom HTML on the order items page?
    What are the best practices for integrating such functionality while ensuring compatibility with Shopify's framework?
    Are there any code examples or insights you could share that might point me in the right direction?

I would appreciate any guidance or tips you could provide. Thanks in advance for your help!

Can you describe this use case a bit more - what exactly should the customer experience when the button is interacted with, and how would the order page change?

@Liam-Shopify We need to integrate an option to print a PDF of a customized invoice for our customers from the customers account order section