Viewing .ps files with google chrome?

There is currently no way to view .ps (PostScript) files in Google Chrome.

I can imagine two ways to get the desired result though:

  1. Convert the postscript file to PDF with some third-party utility and use Chrome's built-in PDF Viewer (or the PDF.js PDF Viewer Chrome extension) to display the PDF file. (this is relatively easy and can be implemented as a Chrome extension)
  2. Implement a PostScript parser, and integrate it in PDF.js.

    • Specification: http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/postscript/pdfs/PLRM.pdf
    • Limited proof of concept: http://logand.com/sw/wps/
    • Feature request on PDF.js issue tracker: https://github.com/mozilla/pdf.js/issues/1594 (this is closed, but if you deliver a high-quality patch, the patch may be accepted).

I compiled GhostScript 9.26 in Web Assembly and wrote a small wrapper to allow direct display of PostScript files in Chrome. You can find it here:

https://chrome.google.com/webstore/detail/ps-wasm/ebpiondkhkldijolgmhfenknngkkjola