TIP DocumentViewerPlugin is not installed on Foswiki.org.

Document Viewer Plugin

Embed presentations, spreadsheets, PDFs and other documents

The Document Viewer Plugin allows you to use presentations, spreadsheets, PDFs and other documents in Foswiki without any external dependencies. No tricks, no conversions, no unexpected downtime from external services, and no plugins required - it happens to work just fine in all major browsers today.

Document Viewer Plugin uses viewerjs, which makes use of pdf.js and webodf to perform the rendering.

Supported formats

Preferences

Currently, there aren't any preferences to be configured.

Syntax

%DOCUMENTVIEWER{"filename.pdf" ... params ...}%

Parameter Description Default
"<filename>" the name of an attached file to be displayed  
topic topic where the file is attached to current topic
format one of the ids 'portrait' (width=742, height=1024), 'landscape' (width=1024, height=742) or 'screen' (width=1024, height=768)  
width reader width 724
height reader height 1024

Installation

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab -> "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button. Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the search results.

You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See https://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Dependencies

None

Change History

28 Apr 2022 docu fixes
02 Sep 2016 make it backwards compatible
27 Sep 2015 fixed masking warnings
16 Aug 2015 Initial version

I Attachment Action Size Date Who Comment
DocumentViewerPlugin.md5md5 DocumentViewerPlugin.md5 manage 183 bytes 28 Apr 2022 - 11:55 MichaelDaum  
DocumentViewerPlugin.sha1sha1 DocumentViewerPlugin.sha1 manage 207 bytes 28 Apr 2022 - 11:55 MichaelDaum  
DocumentViewerPlugin.tgztgz DocumentViewerPlugin.tgz manage 485 K 28 Apr 2022 - 11:55 MichaelDaum  
DocumentViewerPlugin.zipzip DocumentViewerPlugin.zip manage 494 K 28 Apr 2022 - 11:55 MichaelDaum  
DocumentViewerPlugin_installerEXT DocumentViewerPlugin_installer manage 6 K 28 Apr 2022 - 11:55 MichaelDaum  
Topic revision: r5 - 28 Apr 2022, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy