Displaying PDF Documents in Preview Browser


A longer time ago it was possible to read pdf-documents in the browser (nw.js I think). Today it’s not possible anymore. Has something changed? Or what can I do to read pdf-documents in the IDE.

What I tested so far:

  • create new Workspace, no luck.
  • “pop out into new windows” works, the content of the pdf-document is displayed in the browser own pdf-viewer in a new bowser tab (not a tab in the ide)
  • the browser iframe (in the ide) contains the pdf-source, but the “pdf-viewer” from chrome or ff isn’t started, the iframe remains blank

Thanks for any help! I use this feature, because I create a lot of pdf-documents, I wan’t to preview in the ide.


Hey @chirschi :slightly_smiling:,

I assume the state of things for Cloud9 would be viewing PDFs in their own “pop out” browser tab is best for now. This is probably a better way to do most C9 Previews as it avoids other common issues as well at the moment.

Best of luck,


@chirschi this was a regression introduced by sandbox attribute added to the preview iframe. We can remove it for pdf files, thanks for reporting!


@harutyun that would be very nice! Thanks.


@chirschi Could you indicate how to display PDF documents in Cloud9? I’d like to use it for pair-editing of LaTeX documents.


@dpo You can’t simply double click on the pdf-document. But you can right click on the pdf-document (context-menu) and choose preview. The document will open in a new tab. Hope it helps.


@chirschi Thanks. Preview is grayed out for me in the contextual menu. Perhaps @mikeumus will know?!


Hey @dpo :slightly_smiling:,

Took some fumbling around (there are some bugs involved) but I found out how to preview PDFs in Cloud9 IDE and it’s as @chirschi said, but here are some screenshots to go with it:

  1. Right click on the PDF from the left-hand file tree and click “Preview”:

  1. A new workspace browser tab opens with a blue link that says “Click to load”, click that:

  1. Your PDF Preview will load in the Cloud9 workspace browser tab:

:computer: :camera: :alien:


@mikeumus Thanks for clarifying. Sorry for being contrary, but Preview is grayed out for me and I can’t click on it. It seems to be grayed out for you too, but somehow you’re able to click on it.

I wondered if the issue is specific to a PDF generated with pdfLaTeX, so I downloaded http://stlab.adobe.com/wiki/images/d/d3/Test.pdf and I have the same problem with it. The permissions on the PDF files seem ok though:

$ ll *.pdf -rw-r--r-- 1 ubuntu ubuntu 17588 Jul 30 2013 Test.pdf -rw-r--r-- 1 ubuntu ubuntu 47621 Jan 18 21:44 test.pdf

(Test.pdf is the one from Adobe while test.pdf was generated with pdfLaTeX).

Is there some setting I need to activate?


@dpo preview works only for files in workspace folder, is your pdf file in ~?


@harutyun The pdf was in ~ but moving it to ~/workspace didn’t help. I just realized that it makes a difference whether you right-click on a file in the “Favorites” section of the side bar, or in the “File System” section, which is confusing because “Favorites” takes most of the room. Right-clicking on my PDF and selecting Preview opens a browser tab but sadly, nothing is displayed in it.


The fix for this is released today.
For pdf files in workspace double click will open preview directly, and preview menu item will be enabled when clicking on a file from favorites.


That seems to be working if I create a new workspace. Thanks for the fix!