This change adds support for screen readers and allow to disable copying content for view only PDF documents.
In order to simplify things the "view only" permission was implemented using CSS and JS , which should hopefully suffice.
The advantage of this approach, as opposed to e.g. disabling the textLayer completely, is first of all that it ensures that document is accessible through a screen reader. Secondly this also ensures that searching still works correctly even in copy-protected documents.
This kind of copy-protection is not very strong and is also relatively easy to create some workarounds. Hence a simple solution, targeting "normal"-users rather than "advanced"-users is hopefully deemed acceptable here.
This change adds support for screen readers and allow to disable copying content for view only PDF documents.
In order to simplify things the "view only" permission was implemented using CSS and JS , which should hopefully suffice. The advantage of this approach, as opposed to e.g. disabling the textLayer completely, is first of all that it ensures that document is accessible through a screen reader. Secondly this also ensures that searching still works correctly even in copy-protected documents.
This kind of copy-protection is not very strong and is also relatively easy to create some workarounds. Hence a simple solution, targeting "normal"-users rather than "advanced"-users is hopefully deemed acceptable here.
Demo - https://cloud.box.com/s/h9dg4g7bwxorp60qvfvqgu5trjx9v5q6