merged with earlier commits

This commit is contained in:
koderok 2014-05-24 05:37:25 +05:30
parent 6f39d7849f
commit 81d3f4a89b

View File

@ -503,6 +503,22 @@ var Catalog = (function CatalogClosure() {
javaScript.push(stringToPDFString(js));
}
}
// Append OpenAction actions to javaScript array
var openactionDict = this.catDict.get('OpenAction');
if (isDict(openactionDict)) {
var objType = openactionDict.get('Type');
var actionType = openactionDict.get('S');
var action = openactionDict.get('N');
var isPrintAction = (isName(objType) && objType.name === 'Action' &&
isName(actionType) && actionType.name === 'Named' &&
isName(action) && action.name === 'Print');
if (isPrintAction) {
javaScript.push('print(true);');
}
}
return shadow(this, 'javaScript', javaScript);
},