1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Preliminary attachments support

Added a partial Filespec support
Added getAttachments in API
Added a new attachments view in UI (with a new icon by @shorlander)
This commit is contained in:
Samuel Chantaraud 2014-03-18 16:32:47 -04:00
parent 4379f16346
commit 25ee0e8572
13 changed files with 292 additions and 38 deletions

View file

@ -306,6 +306,14 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
}
);
handler.on('GetAttachments',
function wphSetupGetAttachments(data, deferred) {
pdfManager.ensureCatalog('attachments').then(function(attachments) {
deferred.resolve(attachments);
}, deferred.reject);
}
);
handler.on('GetData', function wphSetupGetData(data, deferred) {
pdfManager.requestLoadedStream();
pdfManager.onLoadedStream().then(function(stream) {