Order Printer Pro is designed to automatically get your Shopify store domain in the link if your store complies with two essential aspects:
The store has an "Online store" sales channel (basically, if you have a website)
The Online Store is not password protected.
If both of the above are true, then the app uses the custom domain to generate the PDF link automatically. Therefore, when a customer clicks on the link to download a document, the domain will start with your store's domain name. E.g.
https://example.com/apps/download-pdf/orders/5f2d63e6f59e34f6e312/15587095644731493/cl1239999.pdf
If the link generated directs you to your storefront instead of the PDF, it's because Shopify blocks links that use your domain if password protection is still enabled. If the website is public, then the link provided by the app will work smoothly, and use your store domain by default.