mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Merge pull request #7745 from Snuffleupagus/Launch-actions
[api-minor] Add basic support for `Launch` actions (issue 1778, issue 3897, issue 6616)
This commit is contained in:
commit
6e22b32372
3 changed files with 49 additions and 0 deletions
|
@ -171,6 +171,7 @@ var Catalog = (function CatalogClosure() {
|
|||
var outlineItem = {
|
||||
dest: data.dest,
|
||||
url: data.url,
|
||||
unsafeUrl: data.unsafeUrl,
|
||||
newWindow: data.newWindow,
|
||||
title: stringToPDFString(title),
|
||||
color: rgbColor,
|
||||
|
@ -644,6 +645,12 @@ var Catalog = (function CatalogClosure() {
|
|||
dest = action.get('D');
|
||||
break;
|
||||
|
||||
case 'Launch':
|
||||
// We neither want, nor can, support arbitrary 'Launch' actions.
|
||||
// However, in practice they are mostly used for linking to other PDF
|
||||
// files, which we thus attempt to support (utilizing `docBaseUrl`).
|
||||
/* falls through */
|
||||
|
||||
case 'GoToR':
|
||||
var urlDict = action.get('F');
|
||||
if (isDict(urlDict)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue