1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-28 23:28:16 +02:00

XFA - Add support for access property

- it's a partial fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1716816.
This commit is contained in:
Calixte Denizet 2021-06-20 18:56:14 +02:00
parent 2e6d3d6b00
commit 7cb92a64b1
6 changed files with 49 additions and 0 deletions

View file

@ -448,6 +448,18 @@ function fixTextIndent(styles) {
}
}
function setAccess(node, classNames) {
switch (node.access) {
case "nonInteractive":
case "readOnly":
classNames.push("xfaReadOnly");
break;
case "protected":
classNames.push("xfaDisabled");
break;
}
}
function getFonts(family, fontFinder) {
if (family.startsWith("'") || family.startsWith('"')) {
family = family.slice(1, family.length - 1);
@ -473,6 +485,7 @@ export {
layoutClass,
layoutText,
measureToString,
setAccess,
setMinMaxDimensions,
toStyle,
};