How to display a PDF file inline

I have been trying to have a PDF file preview integrated in a site.
According to this comparison of PDF viewer modules:

“Embedded Google Docs Viewer” would be the one to use, but it only works randomly.
Apart from that “PDF” ( is looking promising but I only manage to show the viewer but not the file.
Has anybody successfully installed a solution?

Hi Catharina,

You can make this work by installing the cern override theme. Download the js library that the PDF module requires and put it in the cern override theme’s folder. Then edit the theme’s yml file to load the js library there.

Hi Catharina,

I just use an i-frame in order to display a pdf that we have stored in EDMS in one of our basic pages. I let the browser’s built-in pdf viewer handle the rest.

It looks like this in Crome:

Probably you need something more sophisticated, but just in case! :slight_smile:


Actually what Eleni proposes is much better and you won’t have to load any libraries.

Upload your PDFs on another website or put them in EDMS and embed them as iframe.

Hi Eleni,
that seems indeed the simplest solution :sweat_smile:

1 Like