Code Monkey home page Code Monkey logo

pdfjsviewer's Introduction

=============================================
=== 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.

pdfjsviewer's People

Contributors

ajnyga avatar algerds avatar asmecher avatar bozana avatar bsvvi avatar diegojmacedo avatar forgive38 avatar jonasraoni avatar jordilacruz avatar marchitelli avatar marherumr avatar mhvezina avatar mtub avatar natewr avatar neffe avatar osmndrmz avatar pnault avatar ppv1979 avatar primoz-svetek avatar shabilullah avatar shorock avatar t-fildishevska avatar teismann avatar tgc avatar thinkbulecount2 avatar tigran54 avatar trungvjm avatar vanyog avatar vitaliy-1 avatar vormia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdfjsviewer's Issues

Plugin cancels hook processing early

@ajnyga notes that the hook callbacks return true when active, cancelling further hook processing:


The plugin also performs the default registration against the HOOK_SEQUENCE_NORMAL scheduling.

HookRegistry::register('ArticleHandler::view::galley', array($this, 'articleCallback'));
HookRegistry::register('IssueHandler::view::galley', array($this, 'issueCallback'));

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.

fullscreen

Is it possible to have fullscreen button or link, like the old version has?

Exactly what is doing this plugin?

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

Browser download a viewer.html instead of showing my PDFs

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!

iframe URLs encoding broke with EZProxy

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

Update PDF.js package

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

Can't activate plugin

Hi, I don't know am I missing something but I can't activate plugin. I have followed instructions:

  1. copy files to /plugins/generic/pdfJsViewer folder
  2. Run the upgrade script
  3. Enable plugin trough interface (activate)

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

Part Duo- Subscribers can't access PDF.js via EZProxy due to URL encoding

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.