I want to create a download panel for pdf.js so that the user can keep track of how far pdf.js is going with loading the pdf document that will be displayed. My application runs through gwt using the pdf.js pdf reader, although I don't think this question has much in common with gwt. In the pdf.js code there is a bject called progressCallback, which should give me the total amount of data in the pdf file that will be displayed, and the amount that was downloaded. It is used in methods such as getDocument ie
PDFJS.getDocument = function getDocument(source,
pdfDataRangeTransport,
passwordCallback,
progressCallback) {
here is another method that uses it and shows how it is used
messageHandler.on('DocProgress', function transportDocProgress(data) {
if (this.progressCallback) {
this.progressCallback({
loaded: data.loaded,
total: data.total
});
, progressCallback. . , , progressCallback.loaded, . , progressBar, progressCallback? !