Téléchargement de document

Télécharger des documents

  • Objet : getARenderJS().getDownloadDocumentJSAPI()
    Fonction Description
    askDownloadDocumentPDF() Télécharger le document pdf actif
    askDownloadDocumentSource() Télécharger le document actif au format source
    askDownloadAllDocuments() Télécharger un unique pdf regroupant tous les documents ouverts
    registerNotifyDocumentDownloadEvent(notifyDocumentDownloadTriggeredHandler) Enregistre une fonction callback à appeler en cas de téléchargement de document
scripts/example.js
function arenderjs_init(arenderjs_)
{
  arenderjs_.getDownloadDocumentJSAPI().registerNotifyDocumentDownloadEvent(
    function(documentId, action) {
      getARenderJS().getCurrentUserName(function(name) {
        var currentDate = new Date();
        console.error(
          "The user " + name +
          " triggered a download document of type " + action +
          " on documentId=" + documentId +
          " at " + currentDate
        );
      });
    }
  );
}