{"record":{"id":"93bb5b767e47083a","repo":"parallax/jsPDF","slug":"invalid-value-value-for-attribute-ff-supplied","errorCode":null,"errorMessage":"Invalid value \"{value}\" for attribute Ff supplied.","messagePattern":"Invalid value \"(.+?)\" for attribute Ff supplied\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/modules/acroform.js","lineNumber":1071,"sourceCode":"        this.F = setBitForPdf(_F, 3);\n      } else {\n        this.F = clearBitForPdf(_F, 3);\n      }\n    }\n  });\n\n  var _Ff = 0;\n  Object.defineProperty(this, \"Ff\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Ff;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _Ff = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Ff supplied.'\n        );\n      }\n    }\n  });\n\n  var _Rect = [];\n  Object.defineProperty(this, \"Rect\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (_Rect.length === 0) {\n        return undefined;\n      }\n      return _Rect;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {","sourceCodeStart":1053,"sourceCodeEnd":1089,"githubUrl":"https://github.com/parallax/jsPDF/blob/a3930ce03a585a26b2c76d12a0f413ce96f6d1a3/src/modules/acroform.js#L1053-L1089","documentation":"Thrown by the AcroFormField.Ff setter when the assigned value is NaN. Ff is the field-specific Flags entry (PDF spec Table 88) controlling behavior per field type (read-only, required, multiline, etc.). It must be an integer bitmask; default 0. The setter uses the same isNaN guard as F.","triggerScenarios":"Assigning field.Ff = 'required' or another non-numeric string; assigning NaN/object; or a computed flag that became NaN.","commonSituations":"Setting field behavior flags with human-readable strings instead of bitmasks; a failed bit operation producing NaN that is then assigned.","solutions":["Assign only integer bitmasks to Ff, or use the high-level boolean properties (readOnly, required, multiline, etc.) that call setBitForPdf/clearBitForPdf correctly.","Coerce and validate the value is a finite number before assignment.","Initialize Ff to 0 and only set bits through documented properties."],"exampleFix":"// before\nfield.Ff = 'multiline'; // throws\n\n// after\nfield.multiline = true; // uses setBitForPdf under the hood\n// or\nfield.Ff = jsPDF.API.__acroform__.setBitForPdf(field.Ff, 13); // bit 13 = Multiline (1-based)","handlingStrategy":"validation","validationCode":"function setFf(field, value) {\n  var n = Number(value);\n  if (!isFinite(n)) throw new Error('Ff must be a numeric bitmask, got ' + value);\n  field.Ff = n;\n}","typeGuard":"function isNumericFlag(v) {\n  return typeof v === 'number' && isFinite(v);\n}","tryCatchPattern":"try {\n  field.Ff = value;\n} catch (e) {\n  if (/attribute Ff supplied/.test(e.message)) {\n    field.Ff = Number(value) || 0;\n  } else throw e;\n}","preventionTips":["Use the high-level boolean properties (readOnly, required, multiline, etc.) instead of raw Ff.","Validate flag values are finite numbers before assignment.","Initialize Ff to 0 and set bits only through documented properties."],"tags":["acroform","field-validation","bit-flags"],"backgroundTag":null,"analyzedSha":"a3930ce03a585a26b2c76d12a0f413ce96f6d1a3","analyzedAt":"2026-08-13T05:33:39.648Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}