{"record":{"id":"ea0a5f853f10301a","repo":"mozilla/pdf.js","slug":"invalid-gettilingpatternir-xstep-value","errorCode":null,"errorMessage":"Invalid getTilingPatternIR /XStep value.","messagePattern":"Invalid getTilingPatternIR /XStep value\\.","errorType":"exception","errorClass":"FormatError","httpStatus":null,"severity":"error","filePath":"src/core/pattern.js","lineNumber":1254,"sourceCode":"}\n\nclass DummyShading extends BaseShading {\n  getIR() {\n    return [\"Dummy\"];\n  }\n}\n\nfunction 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,","sourceCodeStart":1236,"sourceCodeEnd":1272,"githubUrl":"https://github.com/mozilla/pdf.js/blob/5903d58d58e4dd9ce6ffa3834aea8480f06b4ada/src/core/pattern.js#L1236-L1272","documentation":"Error \"Invalid getTilingPatternIR /XStep value.\" thrown in mozilla/pdf.js.","triggerScenarios":"Thrown at src/core/pattern.js:1254 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the tiling pattern dictionary contains a numeric /XStep value specifying the horizontal spacing between pattern cells."],"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"}