Hey there! Sorry for the delay in response, we had a long weekend.
Unfortunately, we don’t have APIs to customize the print modal. I would suggest creating your own modal instead and using our print api to programmatically print.
You can overwrite the default functionality of that button like so:
Try setting the print quality to 2 instead of 20. Also make sure you are using the latest version of Express, there was a bug in previous versions where print quality didn’t work.
Hello,
I used the following code snippets, to print the current page in high quality by clicking on the printButton
instance.UI.setPrintQuality(2);
var currentPageNumber = 1;
// Listener to get current Page
Core.documentViewer.addEventListener('pageNumberUpdated', (pageNumber) => {
currentPageNumber = pageNumber;
});
instance.updateElement('printButton', {
onClick: () => {
printCurrentPage();
}
})
function printCurrentPage(){
instance.UI.printInBackground({
pagesToPrint:[currentPageNumber],
includeComments:false,
includeAnnotations: false,
maintainPageOrientation: true,
onProgress: function(pageNumber, htmlElement) {},
});
}
How can I modify the shortcuts CTRL+P and CMD+P to have the same behaviour, as I did with instance.updateElement(‘printButton’ and also execute the printCurrentPage()-Function?