PDFjs Viewer Mod

Restricted Downloads of PDFjs Viewer Mod are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account Restricted
Caution If you have trouble downloading with Google Chrome, Vivaldi, Brave or other Chromium based browser, try using a right-click and select Open in new Window, then F5, or use another browser such as Firefox


Caution


PDFjs Viewer Mod
Summary Change the PDF viewer from the default to PDFjs
Validation
Mod Updated 02 Jan 2022
Download link For
TNG 14.0
TNG 13.1.1

PDFjs Viewer Mod v13.1.1.2
For
TNG 13.0

PDFjs Viewer Mod v13.0.0.1
Download stats See download statistics
Author(s) Martin Pannier
Brent Hemphill
Homepage PDFjs Viewer Mod (This page)
Mod Support TNG Community Forums
Contact Developer TNG Community Forums
Latest Mod 13.1.1.2
Min TNG V 13.0.0
Max TNG V 14.0.0
Files modified
showmedialib.php
Related Mods
Notes
Requires the pdfjs folder to be placed in the TNG root folder.

Purpose of the mod

This TNG modification changes the default PDF viewer from the browser default to PDFjs. The push to change the default viewer was driven by the need to be able to view multiple pages, or scroll down a page in Android and iOS phone and tablet devices.

  • This change allows mobile and tablet devices to view PDF files in a viewer that uses page viewing and other PDF options that are not necessarily available with the default browser option.
  • This change also allows for some customization of button options for those administrators wishing to control the PDF viewing options with the customization listed below.

Developer

The PDF Viewer Mod was originally developed by Martin Pannier.
The PDFjs Viewer Mod was created from the original PDF Viewer Mod to work in TNG 13 with a newer version of PDFjs by Brent Hemphill.
Jim Brown did beta testing to check the functionality under additional setup configurations. Dutch language strings by Rob Severijns.

Requirements

  • A working TNG installation.
  • A backup of all affected files (see the list in the summary in the upper right corner of the page)
  • An installed current version of the Mod Manager.

Revision History

Mod Version TNG Version Date Contents
13.1.1.2 13.1.1 02 Jan 2022 Update for TNG 13.1.1 compatibility.
Dutch language strings by Rob Severijns.
13.0.0.1 13.0 16 Sep 2021 Fix issues when the path to the media is in the root or other unexpected paths.
Add an option to allow for enabling the viewer all the time or only when in mobile mode.
13.0.0.0 13.0 26 May 2021 initial release

Conflicts and Issues

No known conflicts.

Installation

  1. Uninstall and delete previous version of this mod (if installed)
  2. Download the appropriate zip file as shown in the mod summary in the upper right corner of the page.
  3. ***Extract the pdfjs folder to your TNG root folder.***
  4. Extract the .cfg file from the downloaded zip file into the mods folder or FTP the extracted file to your mods folder.
  5. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the mod.

In the event of a problem

Uninstalling the mod

If you want to completely Remove (uninstall) this mod and all its tables, you should

  1. click the Uninstall button to uninstall the mod
  2. click the Delete button to delete the config file from the mods folder.

Upgrade

  • Uninstall and eventually Delete the current Mod.
  • Proceed as for an installation with the new Mod.

cust_text.php

The following custom text entries need to be created in your language, if you do not use English or Dutch for TNG Admin

		$admtext['pdfjs_viewer'] = "Enable pdfjs Viewer";
		$admtext['mobile_only'] = "Mobile only";

Customizations

Under Administration >> Setup >> Configuration >> General Settings >> Media >> Enable pdfjs viewer there is the option to enable PDFjs as the viewer only for mobile mode, or always.

Although the default buttons in the viewer generally work well, some buttons may be customized to be hidden

  • Open
  • Download
  • Print
  • Bookmark

The above buttons may be changed by using PDFjs Viewer Mod Hide Buttons v13.0.0.1 and removing any buttons from the cfg that you do not wish to be hidden from the user. You only need this mod if you want to hide some of the default viewer buttons listed above.

Sites using this mod

If you download and install this mod, please add your TNG site to the table below:

URL User Note Mod-Version TNG-Version User-language
Brent Hemphill Private Site/localhost 13.1.1.2 13.1.1 EN
The Brown Family James Brown Beta tester 13.1.1.2 13.1.2 EN
A Line of Malkins in NZ Rick Malkin Private 13.1.1.2 13.1.1 EN
The Severijns / Timmer Familytree Rob Severijns Public / Private 13.1.1.2 14.0.4 NL, EN
Sejarah Thümann Jeffrey Thümann Public 13.0.0.1 13.0.3 NL,EN
Helwegs Ahnen Andreas Helweg Public 13.0.0.1 13.1 DE,EN,NL,DA
Jones Localhost Michael T. Jones Private 13.1.1.2 13.1.2 EN
Vår Familjehistoria Lars Arén Public 13.1.1.2 14:0.4 SE,EN,DE
Botebygden Community Research Lars Arén Public 13.1.1.2 13.1.2 SE
Discovering My Ancestors Sheryl Perry Public 13.1.1.2 14.0 EN
Solem Genealogy Jan-Thore Solem Private 13​.1​.1​.2 14.0.2 EN, NO
MOTYER Family Genealogy John Mark Motyer Public See here See here EN
Sorrell Notes Genealogy Joel Ford Public 13​.1​.1​.2 14.0.3 EN