Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Viewing .ps files with google chrome?

I wonder if there is a way to view .ps files without downloading/saving them while one using the Google chrome?

like image 366
math137 Avatar asked Jan 16 '15 15:01

math137


People also ask

How do I view a .PS file?

Just double-click on the file in question and choose your preferred program from the options provided by your computer. A bit of tinkering with the extensions will also allow you to open PS files using your web browser — specifically the PostScript Viewer and Compiler for Chrome.

How do I open a .PS file on a Mac?

To open a PostScript file (. ps extension) or PDF file (. pdf), select File -> Open, or type cmd-O. You will then be presented with the dialog box from which you can select the file to open.

How do I open a .PS file in Linux?

To view PDF files, use the gpdf application. For PS files, use ggv. Both gpdf and ggv are integrated into Nautilus. Double-clicking on a PDF or PS file while in Nautilus opens the file in the large pane of the Nautilus window.


2 Answers

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).
like image 137
Rob W Avatar answered Sep 28 '22 12:09

Rob W


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

like image 28
Ocha Avatar answered Sep 28 '22 11:09

Ocha