mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 07:38:07 +02:00
Append the contents of FileAttachment
annotations to the attachments view of the sidebar, for easier access to the embedded files
Other PDF viewers, e.g. Adobe Reader, seem to append `FileAttachment`s to their attachments views. One obvious difference in PDF.js is that we cannot append all the annotations on document load, since that would require parsing *every* page. Despite that, it still seems like a good idea to add `FileAttachment`s, since it's thus possible to access all the various types of attachments from a single place. *Note:* With the previous patch we display a notification when a `FileAttachment` is added to the sidebar, which thus makes appending the contents of these annotations to the sidebar slightly more visible/useful.
This commit is contained in:
parent
616e5fadff
commit
c102232275
6 changed files with 91 additions and 12 deletions
|
@ -26,6 +26,12 @@ var LinkServiceMock = (function LinkServiceMockClosure() {
|
|||
function LinkServiceMock() {}
|
||||
|
||||
LinkServiceMock.prototype = {
|
||||
get page() {
|
||||
return 0;
|
||||
},
|
||||
|
||||
set page(value) {},
|
||||
|
||||
navigateTo: function (dest) {},
|
||||
|
||||
getDestinationHash: function (dest) {
|
||||
|
@ -36,7 +42,13 @@ var LinkServiceMock = (function LinkServiceMockClosure() {
|
|||
return '#';
|
||||
},
|
||||
|
||||
executeNamedAction: function (action) {}
|
||||
setHash: function (hash) {},
|
||||
|
||||
executeNamedAction: function (action) {},
|
||||
|
||||
onFileAttachmentAnnotation: function (params) {},
|
||||
|
||||
cachePageRef: function (pageNum, pageRef) {},
|
||||
};
|
||||
|
||||
return LinkServiceMock;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue