{"record":{"id":"d9b3face8812c5c6","repo":"mozilla/pdf.js","slug":"invalid-gettilingpatternir-painttype-value","errorCode":null,"errorMessage":"Invalid getTilingPatternIR /PaintType value.","messagePattern":"Invalid getTilingPatternIR /PaintType value\\.","errorType":"exception","errorClass":"FormatError","httpStatus":null,"severity":"error","filePath":"src/core/pattern.js","lineNumber":1262,"sourceCode":"function getTilingPatternIR(operatorList, dict, color, needsIsolation = true) {\n  const matrix = lookupMatrix(dict.getArray(\"Matrix\"), IDENTITY_MATRIX);\n  const bbox = lookupNormalRect(dict.getArray(\"BBox\"), null);\n  // Ensure that the pattern has a non-zero width and height, to prevent errors\n  // in `pattern_helper.js` (fixes issue8330.pdf).\n  if (!bbox || bbox[2] - bbox[0] === 0 || bbox[3] - bbox[1] === 0) {\n    throw new FormatError(`Invalid getTilingPatternIR /BBox array.`);\n  }\n  const xstep = dict.get(\"XStep\");\n  if (typeof xstep !== \"number\") {\n    throw new FormatError(`Invalid getTilingPatternIR /XStep value.`);\n  }\n  const ystep = dict.get(\"YStep\");\n  if (typeof ystep !== \"number\") {\n    throw new FormatError(`Invalid getTilingPatternIR /YStep value.`);\n  }\n  const paintType = dict.get(\"PaintType\");\n  if (!Number.isInteger(paintType)) {\n    throw new FormatError(`Invalid getTilingPatternIR /PaintType value.`);\n  }\n  const tilingType = dict.get(\"TilingType\");\n  if (!Number.isInteger(tilingType)) {\n    throw new FormatError(`Invalid getTilingPatternIR /TilingType value.`);\n  }\n\n  return [\n    \"TilingPattern\",\n    color,\n    operatorList,\n    matrix,\n    bbox,\n    xstep,\n    ystep,\n    paintType,\n    tilingType,\n    needsIsolation,\n  ];","sourceCodeStart":1244,"sourceCodeEnd":1280,"githubUrl":"https://github.com/mozilla/pdf.js/blob/5903d58d58e4dd9ce6ffa3834aea8480f06b4ada/src/core/pattern.js#L1244-L1280","documentation":"Error \"Invalid getTilingPatternIR /PaintType value.\" thrown in mozilla/pdf.js.","triggerScenarios":"Thrown at src/core/pattern.js:1262 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set /PaintType in the tiling pattern dictionary to 1 (colored) or 2 (uncolored/stencil); any other value is invalid."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5903d58d58e4dd9ce6ffa3834aea8480f06b4ada","analyzedAt":"2026-08-13T02:28:27.364Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}