stellR42 / vue3-pdf-app

Vue 3 PDF viewer based on Mozilla's PDFJS
MIT License
84 stars 29 forks source link

how to disabled keyevent such as ctrl+s #23

Closed awesomeric closed 3 months ago

awesomeric commented 7 months ago

Please describe a feature/problem. how to disabled keyevent such as ctrl+s

Describe the solution you'd like no such api

Describe alternatives you've considered added a config to do that?

Additional context

remiebelingmerifond commented 5 months ago

I had a simliar problem. I needed to prevent users from Printing and downloading the PDD-File using Keyboard-Shortcuts.

Since i was not able to find any suitable config values, i ended up with a kinda hacky "Solution". Not nice, but it seems to do the trick for now...

@awesomeric just in case you – or anyone else, are still looking for a workaround, here is what i came up with:

<vue-pdf-app
    style="height: 100vh;"
    :pdf="pdfSrc"
    @pages-rendered="pagesRendered"  
    />
pagesRendered (pdfLib) {
    pdfLib.unbindWindowEvents();
}
stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.