PDF Viewer Macro

Version 75.48 by Admin on 2022/02/28 00:27

cogPDF Viewer Macro based on Mozilla's pdf.js
Developed by

Sofiane Baloul, Ludovic Dubost, Denis Gervalle, Anca Luca, Raluca Stavro, Oana Tabaranu

Active Installs1213
10 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


You can also try the Pro version: PDF Viewer Macro (Pro). The Pro PDF Viewer Macro allows you to display several PDFs using a tab system layout. It also includes an update of the PDF.js library version and improvements for external PDFs.

This PDF Viewer Macro allows to view pdf attached to XWiki page right inside the XWiki page. 

This package is based on pdf.js by andreasgal.
See http://mozilla.github.com/pdf.js for more information

It has been adapted and packaged specifically for this macro with some slight modifications.


The viewer supports a double full screen mode (first going full screen in your browser and then going full screen on your computer if your browser supports that mode)

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

If the PDF is downloaded instead of displayed inline when using the Pdf Viewer Macro as below:


In this case you have to save the attachment pdfviewer.zip on the macro page with programming rights (this is a security feature to prevent XSS via FileUpload: http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki52#HChoosingwhichtypesofattachmentscanbedisplayedinline28Security29).

Release Notes








 Starting with this version the wiki macro defined by this extension is no longer a global macro but a current wiki one.


Get Connected