That “mime-type” varies per browser/device (and every user in the world can change this setting themselves). @stemon You would be best to open in a new window, and just let the browser do its thing.
On Shopify, the PDF file will pop up in a new tab automatically. Your customers can preview the file and choose to download it with just a click. If you want the file to be downloaded right away, you can use a docs file instead.
By the way, I have a great suggestion for you ! There’s a super useful, free Shopify app - Ease Product Attachments that lets you upload your files in different formats and showcase them on your product pages. That way, your customers can easily access and download them.
Go one step further and create an immersive digital flip catalog version to deliver an incredible, stand-out experience that elevates your content. Simply upload your PDF and you can make it clickable, shoppable, downloadable, and more!
If you are selling on Shopify + other places and intend to use the same PDF form for your return; you may want to consider using a third party PDF hosting instead of Shopify, for example Google Drive, Dropbox or Titlegram.
They all come with free option, and Titlegram also lets you host it on a shorter and more professional URL with your branding.
How to Force PDF Downloads Using JavaScript in Shopify: A Complete Guide
If you’re looking to implement a solution in your Shopify store where PDF files download automatically instead of opening in the browser, this guide is for you. By default, PDF files uploaded to Shopify often open in the browser when linked. To fix this and ensure a smooth user experience, you can use JavaScript to force the files to download.