mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Add support for "GoToE" actions with destinations (issue 17056)
This shouldn't be very common in practice, since "GoToE" actions themselves seem quite uncommon; see PR 15537.
This commit is contained in:
parent
da4fdc76a3
commit
bf9c33e60f
7 changed files with 62 additions and 19 deletions
|
@ -67,7 +67,7 @@ class DownloadManager {
|
|||
/**
|
||||
* @returns {boolean} Indicating if the data was opened.
|
||||
*/
|
||||
openOrDownloadData(element, data, filename) {
|
||||
openOrDownloadData(element, data, filename, dest = null) {
|
||||
const isPdfData = isPdfFile(filename);
|
||||
const contentType = isPdfData ? "application/pdf" : "";
|
||||
|
||||
|
@ -93,6 +93,9 @@ class DownloadManager {
|
|||
"?file=" +
|
||||
encodeURIComponent(blobUrl + "#" + filename);
|
||||
}
|
||||
if (dest) {
|
||||
viewerUrl += `#${escape(dest)}`;
|
||||
}
|
||||
|
||||
try {
|
||||
window.open(viewerUrl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue