Skip to content

Conversation

@danxuliu
Copy link
Member

Backport of #179

danxuliu added 4 commits May 20, 2020 16:30
Even if the Download buttons are hidden in the toolbars it was still
possible to trigger the download by using Ctrl|Meta+S. This directly
calls the "PDFViewerApplication.download" function, so when downloads
are hidden that function is now replaced with an empty function.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Printing with the Print button from the toolbar as well as through
Ctrl|Meta+P uses the print service from PDFViewer, so when the download
is hidden the print service is now disabled.

When printing is flagged as not supported in the PDFViewerApplication
initialization the Print buttons are disabled, so it is not needed to
disable them explicity.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Even if printing was not possible using the PDFViewer printing services
it was still possible to print the PDF document by printing the web page
from the browser. As that can not be really prevented the best that can
be done is hide all the content in the printed media using CSS.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When the PDF is rendered PDFViewer creates canvases with the contents of
the pages and, in front of them, it creates too a layer with HTML text
elements that makes possible to select it. That text layer is used too
by the search function to highlight the results, so it can not be
removed. Instead of that the selection of the text is prevented using
CSS.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@rullzer rullzer merged commit 5e4178e into stable16 May 22, 2020
@delete-merged-branch delete-merged-branch bot deleted the backport/179/stable16 branch May 22, 2020 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants