Add support for specifying non-default Optional Content in the ref-tests
This commit is contained in:
parent
853b1172a1
commit
1a1de9bb3e
@ -519,7 +519,7 @@ var Driver = (function DriverClosure() {
|
||||
styleElement: xfaStyleElement,
|
||||
});
|
||||
loadingTask.promise.then(
|
||||
doc => {
|
||||
async doc => {
|
||||
if (task.enableXfa) {
|
||||
task.fontRules = "";
|
||||
for (const rule of xfaStyleElement.sheet.cssRules) {
|
||||
@ -531,6 +531,15 @@ var Driver = (function DriverClosure() {
|
||||
task.optionalContentConfigPromise =
|
||||
doc.getOptionalContentConfig();
|
||||
|
||||
if (task.optionalContent) {
|
||||
const entries = Object.entries(task.optionalContent),
|
||||
optionalContentConfig =
|
||||
await task.optionalContentConfigPromise;
|
||||
for (const [id, visible] of entries) {
|
||||
optionalContentConfig.setVisibility(id, visible);
|
||||
}
|
||||
}
|
||||
|
||||
this._nextPage(task, failure);
|
||||
},
|
||||
err => {
|
||||
|
@ -5025,6 +5025,15 @@
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue13931-hidden",
|
||||
"file": "pdfs/issue13931.pdf",
|
||||
"md5": "799d5025787115d22863ae23a3042491",
|
||||
"rounds": 1,
|
||||
"type": "eq",
|
||||
"optionalContent": {
|
||||
"7R": false
|
||||
}
|
||||
},
|
||||
{ "id": "issue2829",
|
||||
"file": "pdfs/issue2829.pdf",
|
||||
"md5": "f32b28cf8792f6ccc470446bfbb38584",
|
||||
|
Loading…
x
Reference in New Issue
Block a user