Modifying styles of print dialog

35 views
Skip to first unread message

Matt Parizeau

unread,
Aug 30, 2016, 3:45:53 PM8/30/16
to PDFTron WebViewer
Q:

We would like to customize the print dialog so that it looks more like the rest of our app. What's the best way to do this?

A:

If you just want to modify the styles of the existing dialog you could have code like the following which would get the dialog element and allow you to change any of the css or add new elements:
var $printDialog = $('#printDialog');

$printDialog
.on('dialogcreate', function(e, ui) {
 
var dialogElement = $printDialog.parent();
 
var titleBar = dialogElement.find('.ui-dialog-titlebar');
 
// customize here
});

Reply all
Reply to author
Forward
0 new messages