The functionality I'm after is where Sublime Text opens the browser to the print preview of the file currently edited.
This is the following:
- Have a txt file (in sublime).
- Select File > Print
- Observe that the default browser opens up to the print preview page (tested in firefox and safari)
The urls seem to point to the file being in a temp directory and generated as a html file.
file:///private/var/folders/05/q2p__63n3zx9k3yzcb8f9n0c0000gn/T/tmpbfkdzvmq.html
Note html generation isn't necessary for my use case, remaining as txt is fine.
The answer can be for either swift or objective-c. I'm after how to open the browser to print preview.