Skip to main content
Version: v2023.18.0

Print Document

  • Object: getARenderJS().getPrintJSAPI()

    FunctionDescription
    askShowPrintDialog()Show the print popup
    askPrintAllDocumentPages()Ask a print of all documents
    registerNotifyDocumentPrintEvent(notifyDocumentPrintTriggeredHandler)Trigger a callback function when a document print is asked

Example

scripts/example.js
function arenderjs_init(arenderjs_)
{
arenderjs_.getPrintJSAPI().registerNotifyDocumentPrintEvent(
function(documentId, action, isAnnotationsIncluded, isWatermarksIncluded) {
arenderjs_.getCurrentUserName(function(name) {
var currentDate = new Date();
console.info(
"The user " + name +
" triggered a download document of type " + action +
" on documentId=" + documentId +
" are annotations included=" + isAnnotationsIncluded +
" are watermarks included=" + isWatermarksIncluded +
" at " + currentDate
);
});
}
);
}