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:
parent
4379f16346
commit
25ee0e8572
13 changed files with 292 additions and 38 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue