Ngx-extended-pdf-viewer: [Feature request] Disable right-click on pdf view

Created on 25 Jul 2019  路  10Comments  路  Source: stephanrauh/ngx-extended-pdf-viewer

Is your feature request related to a problem? Please describe.

I'd like to be able disable right click inside of the pdf view:

MicrosoftTeams-image

Describe the solution you'd like
Add a new attribute in the configuration to disable right click just as the options for disabling buttons, etc...

Solved enhancement

Most helpful comment

I've just released version 1.0.0-rc.5. Adding the files pdf-es5.js, pdf.worker-es5.js, and viewer-es5.js to the angular.json fixes IE11 compatibility.

Please note I've renamed these files today.

All 10 comments

Normally I shy away from adding features during the release-candidate phase... but in this case, I've decided to make an exception. It's both an easy-to-implement and useful feature. I've shipped it with version 1.0.0-rc.4.

Here's the live demo: https://pdfviewer.net/contextmenu

Enjoy!

Wow! Lost for words, never expected such quick and positive reaction, thank you so much!

Hi again, sorry to come back with this in release period, but it breaks the pdf visualization when we've upgraded to latest version on IE 11

It works fine on Chrome

And we get following error message in console:

_ERROR TypeError: Object doesn't support property or method 'webViewerLoad'_

@StevenGarcia-CG Don't worry. If the library is broken for you, it's broken for me, too! :)

(Not sure if that's good English, but I hope you get the gist of it).

@StevenGarcia-CG Ok, this bug isn't completely unexpected. I just hoped this chalice might pass from me.

Most likely, you're a victim of the lacking ES6 compatibility of IE11. I tried to reproduce your bug, but to no avail. I've seen many bugs, but not your's. However, as soon as I replaced the three files pdf.js, pdf-worker.js, and viewer.js by the ES5 counterparts, IE11 was able to display me test page.

What does this mean to you?

  • Most likely, upgrading from 1.0.0-rc.1 to 1.0.0-rc.2 breaks your IE11 compatibility. That's when I started to publish the ES6 files instead of the hard-to-debug ES5 files.
  • I've prepared a new version of ngx-extended-pdf-viewer. This new version features new files called pdf-2.2-e5.js, pdf-worker.2.2-es5.js, and viewer-2.2.-es5.js. You can reference these new files in your angular.json. That should fix your bug.

I'd like to run a few more tests before publishing this on npm. However, if you're curious enough to run a test on a weekend, the new files are already available on GitHub: https://github.com/stephanrauh/ngx-extended-pdf-viewer/tree/master/projects/ngx-extended-pdf-viewer/src/assets

I've just released version 1.0.0-rc.5. Adding the files pdf-es5.js, pdf.worker-es5.js, and viewer-es5.js to the angular.json fixes IE11 compatibility.

Please note I've renamed these files today.

To do list:
[ ] double-check if the automated conversion of the Mozilla files catches everything it catches in the "non-Babeled" version.

It works! (sorry for not giving feedback sooner, been totally off the radar this weekend)

Thanks again for such amazing reactiveness!

Nice Fixxxx :)

OK, it seems everything works. Thanks for you feedback, @StevenGarcia-CG and @am-awais !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sameerAhmad9291 picture sameerAhmad9291  路  7Comments

ekselys picture ekselys  路  5Comments

DHalilovic picture DHalilovic  路  6Comments

achapman009 picture achapman009  路  3Comments

Avejack picture Avejack  路  4Comments