disable print and download functions

829 views
Skip to first unread message

Dan Howell

unread,
Jan 24, 2018, 1:32:09 PM1/24/18
to PDFTron WebViewer
I want to disable print and download functions for all doctypes (pdf, xod, etc).

How do I disable the print and download functions in the call to PDFTron.WebViewer ?

Thanks

Matt Parizeau

unread,
Jan 25, 2018, 2:47:14 PM1/25/18
to PDFTron WebViewer
You can add the following code in a config file:

ReaderControl.config.ui.hidePrint = true;

$
(document).on('viewerLoaded', function() {
  $
('#downloadButton').hide();
});

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Sergey Kolosov

unread,
Jul 9, 2018, 1:00:56 PM7/9/18
to PDFTron WebViewer
Hello Matt!

Although `ReaderControl.config.ui.hidePrint` has been set to `true` if a user presses Ctrl+P a PDFTron Print pop-up will be displayed there.
Matt, I just wonder if it's possible to disable print functionality at all.

Best regards,
Sergey Kolosov 

Matt Parizeau

unread,
Jul 10, 2018, 1:25:56 PM7/10/18
to PDFTron WebViewer
Hi Sergey,

You could add the following code to your config file which just overrides the default printing implementation to do nothing:

ReaderControl.prototype.print = function() {};

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages