Loading...
 
Features / Usability

Features / Usability


Trying to install PDF.js

posts: 4 Australia

Hi all, I'm trying (unsuccessfully) to install pdf.js to enable in-browser viewing of pdf files in a separate tab/window, like countless sites on the web can do. This is a crucial feature for me.

Status;
- Tiki v19.1 installed with php 7.2
- pdf.js unzipped to /addons folder in Tiki instance
- Confirmed composer is installed, run setup.sh successfully
- composer.json file is present in root
- followed instructions here by running php console.php addon:install pdfjs-2.0.943-dist (being the latest stable version) from Tiki root folder using shell
- result is No profiles found with red background :-(

2019 06 03 15 55 46 Window

I also tried checking that the db is updated, and it is.

I'd really appreciate any advice and suggestions. I'm not a coder, and am building a Tiki demo for use in the trade association for which I work. We're heavy users of PDFs, and without this feature working I unfortunately can't use Tiki.

Thank you in advance!

posts: 37

I have Tiki 19.1 installed, and a PDF files saved in a file gallery opens already automatically in a new browser tab. So there is no need to install anything.

Otherwise you could try to change TikiRoot\tiki-download_file.php

Copy to clipboard
if (! $content_changed and ! isset($_GET['display'])) {

Replace by:

Copy to clipboard
if (! $content_changed and ! isset($_GET['display']) and $info['filetype'] != 'application/pdf' ) {


Btw, go the tab 'Packages' in Control panels to install extra packages ( I don't think the way you subscribe is the way to install extra functionality)


posts: 4 Australia

Thank you Wiebe. Last year I'd been trying to do this with Tiki 18.3 and it would only download the pdf, not enable in-browser viewing. I only returned to Tiki when I found the document about pdf-js viewer for v19, and followed instructions thereon. Hence the complex process which I noted, including manual packages install. Turns out it's unnecessary.

So I just tried an in-line file placement as you suggested and see there is now an option for opening in browser. Excellent! I should've tried that first. I appreciate you taking the time to respond.

Dave


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting