Greetings,
I’m working on integrating EasyPost shipping with ERPNext. There are a few ways EasyPost offers shipping labels. I think the most flexible (for printing purposes) is a .png file offered as a URL. When I use the Tools > print shipping label, it opens a .png file URL (which is hosted on Amazon S3 bucket from EasyPost’s Amazon account) in a new tab. Unfortunately, the new tab displays the .png file but without any controls/buttons to download or print the file. The user would need to print the web page via the browser’s file menu, which is not ideal.
I’m looking for solutions on how to print this file using the provided URL.
Should I use something like CURL or WGET to download the file to the server, then try to print? This doesn’t seem ideal as there will be maintenance needed to discard old files.
Is there a way to use the Frappe print preview with a file located on another server like Amazon s3?
It seems .png files are generally problematic. I even tried adding the .png file as an upload to the files app. The files app will show a preview of the file, but if I choose to download it simply opens the file in a new tab of the browser with no option to print or download. Is this a limitation of .png?
Of course if I try to print via the files app it will print the doctype, not the file contents.
Thanks in advance for taking the time.