Changes for page PDF Viewer Macro

Last modified by Simon Urli on 2020/03/30 00:27

From version < 63.1 >
edited by Alex Cotiugă
on 2018/04/25 14:01
To version < 64.1 >
edited by Alex Cotiugă
on 2018/04/25 14:19
< >
Change comment: There is no comment for this version



... ... @@ -1,5 +1,5 @@
1 1  {{info}}
2 -You can also try the Pro version: [[]].
2 +You can also try the Pro version: [[PDF Viewer Macro (Pro)>>]].
3 3  {{/info}}
4 4  
5 5  This PDF Viewer Macro allows to view pdf attached to XWiki page right inside the XWiki page.
cogPDF Viewer Macro based on Mozilla's pdf.js
Developed by

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

Active Installs907
9 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


You can also try the Pro version:

You can also try the Pro version: PDF Viewer Macro (Pro).

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 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)

Tested on

This extension has been tested with the following configurations.

Extension VersionXWiki FlavorNotes
1.2XWiki Enterprise 4.1.4, 4.3

Compared to PDF Macro it does not require native support of PDFs by your browser/operating system, and compared to the Google Document Viewer Macro it does not require your document to be public on the web.

However the viewer is not compatible with ALL browser versions. It requires the "canvas" element and is therefore not compatible with Internet Explorer 9 and prior versions.

1.4XWiki Enterprise 6.0.1
1.4.1XWiki Enterprise 6.4.2

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 on the macro page with programming rights (this is a security feature to prevent XSS via FileUpload:

Release Notes


  • Closed PDFVIEWER-17 Links in PDF document should not be opened in the iFrame of the viewer
  • Closed PDFVIEWER-16 Content added after PDF Viewer macro is deleted when saving the page from WYSIWYG editor


  • Closed PDFVIEWER-15 PDF Error when a user without rights reach a document
  • Closed PDFVIEWER-14 Null name when reporting missing document
  • Closed PDFVIEWER-13 Allow author of the macro to delegate its view right on the PDF document
  • Closed PDFVIEWER-12 Allow targeting the PDF in another document using document name and filename





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

  • Closed PDFVIEWER-4 Pdf viewer macro don't have global admin as author
  • Closed PDFVIEWER-3 Pdf viewer macro should be a current wiki macro


  • Closed PDFVIEWER-2 Open the links inside the PDF documents in a new tab
  • Closed PDFVIEWER-1 Cannot open links with border 0px in IE10

Get Connected