pkp / pdfjsviewer Goto Github PK
View Code? Open in Web Editor NEWA pdf.js-based PDF viewer for OJS articles and issue galleys.
License: GNU General Public License v2.0
A pdf.js-based PDF viewer for OJS articles and issue galleys.
License: GNU General Public License v2.0
============================================= === pdf.js Viewer Plugin === A pdf.js-based PDF viewer for OJS 3.0.x === Author: Alec Smecher <[email protected]> ============================================= About ----- This is a PDF viewer plugin based on the pdf.js PDF reader. License ------- This plugin is licensed under the GNU General Public License v2. See the file LICENSE for the complete terms of this license. Installation ------------ To install this plugin, place its files into a subdirectory of plugins/viewableFiles called pdfJsViewer. Run the upgrade script (please back up your database before doing this) to register the plugin with your installation of OJS. Once the plugin has been installed, use the Journal Manager's "Plugins" interface to enable it. Contact/Support --------------- Please email the authors for support, bugfixes, or comments.
The library hasn't been updated in a couple of years, and it will bring sensitive improvements.
@ajnyga notes that the hook callbacks return true
when active, cancelling further hook processing:
pdfJsViewer/PdfJsViewerPlugin.inc.php
Line 81 in dcf7dcc
pdfJsViewer/PdfJsViewerPlugin.inc.php
Line 111 in dcf7dcc
The plugin also performs the default registration against the HOOK_SEQUENCE_NORMAL
scheduling.
pdfJsViewer/PdfJsViewerPlugin.inc.php
Lines 24 to 25 in dcf7dcc
If we need to terminate additional hook processing, we should register against HOOK_SEQUENCE_LAST
instead. Alternately, we might evaluate whether the choice to terminate hook processing is really merited.
Is it possible to have fullscreen button or link, like the old version has?
Hi I have enabled the plugin in OJS 2.4.8 but how can I see if it's working? What is doing exactly? I want to have a pdf from blind manuscript and supplementary files after submission to do the reviewing easier. Because the reviewers should download separated 1 or 2 or 3 or ... N files to review an article. So It was better if the reviewer should download a file (pdf) with in all the files of submission...
Hi there,
I'm running the latest version of OJS with pdfJsViewer installed and enabled. When I click on any PDF links, my browser download a file named viewer.html instead of showing the PDF file as supposed... When I disable the pdfJsViewer plugin, the browser now download the PDF file as supposed to be.
Any help would be appreciated. Thanks!
Hi Everyone,
This is an old issue that has reappeared, so I'm opening a new issue here and will provide a PR shortly. More discussion can be found here, but I will summarize the issue here as well. pkp/pkp-lib#6246
An Iter journal subscriber reported 2 weeks back that EZProzy suddenly stopped rewriting URLs. For context, here is more information about our EZProxy setup.
At the end of the Iter Stanza file the following worked fine.
Find jps.library.utoronto.ca
Replace ^sjps.library.utoronto.ca^
Then in the past few months a different resource that we proxy introduced this line into EZP's config.txt.
This additional line interfered with the JavaScript Find/Replace.
DJ utoronto.ca
After removing DJ utoronto.ca, the Find/Replace worked again. The problem is not specific to OJS. We were able to replicate identical behaviour with other domains that we host. And just in case, we're also currently on EZProxy version 6.5.1 GA.
The fix required changes to the following lines:
<script type="text/javascript">
// Creating iframe's src in JS instead of Smarty so that EZProxy-using sites can find our domain in $pdfUrl and do their rewrites on it.
$(document).ready(function() {ldelim}
var urlBase = "{$pluginUrl}/pdf.js/web/viewer.html?file=";
var pdfUrl = "{$pdfUrl}";
var encodedPdfUrl = encodeURIComponent(pdfUrl);
encodedPdfUrl = encodedPdfUrl.replace("https%3A%2F%2F", "https://").replace("http%3A%2F%2F", "http://");
$("#pdfCanvasContainer > iframe").attr("src", urlBase + encodedPdfUrl);
{rdelim});
</script>
A PR is opened here, please let me know if I can assist with any changes or suggestions. Thank you! https://github.com/pkp/pdfJsViewer/pull/61/files
Take care and stay safe,
Rachel
Hi Alec,
The current version of the PDF.js package occasionally has some render problems with certain PDFs. We had a hosted client point out that in one PDF, some of the images in the PDF were rotated 90 degrees, or flipped upside down. They looked fine when the PDF was downloaded and opened locally. I upgraded their plugin to use the most recent build here:
https://github.com/mozilla/pdf.js/releases/tag/v2.5.207
And the problem is solved now. Can we get that included in the plugin package officially, please?
I can provide links to the affected PDF if you'd like to see the problem in action.
Cheers,
Jason
Hi, I don't know am I missing something but I can't activate plugin. I have followed instructions:
But result is same, on windows machines pdf's are displayed in Adobe reader plugin, and in Kubuntu 14.04 Firefox i get message that browser doesn't have plugin installed.
We are currently using OJS 2.3.7.0 (with plan to upgrade it to latest version ASAP).
Thanx for help
Libraries running exproxy are still having problems with PDF.js generating errors even when using the search and replace function in the stanza.
I hope someone can shed light on the current state of this issue. I have been through all the threads on the forum and github but they all seem to die after the release of 3.2.x. We are running 3.3.0.14 . The search and replace function in the OCLC stanzas were validated by their tech support on OCLC hosted ezproxy servers but those running their own exproxy seem to be having the issue..and they claim to have made the ezproxy search and replace stanza update.
Thoughts please? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.