Skip to main content
Version: v2023.18.0

Document download

Download documents

  • Object: getARenderJS().getDownloadDocumentJSAPI()

    FunctionDescription
    askDownloadDocumentPDF()Download the current document in PDF
    askDownloadDocumentSource()Download the current document in source format
    askDownloadAllDocuments()Download a single PDF with all opened documents
    registerNotifyDocumentDownloadEvent(notifyDocumentDownloadTriggeredHandler)Trigger a callback function when a document download is asked

Example

scripts/example.js
function arenderjs_init(arenderjs_)
{
arenderjs_.getDownloadDocumentJSAPI().registerNotifyDocumentDownloadEvent(
function(documentId, action) {
getARenderJS().getCurrentUserName(function(name) {
var currentDate = new Date();
console.info("The user " + name +
" triggered a download document of type " + action +
" on documentId=" + documentId +
" at " + currentDate);
});
}
);
}