mozilla/pdf.js · error · FormatError

Invalid getTilingPatternIR /TilingType value.

Error message

Invalid getTilingPatternIR /TilingType value.

What it means

Error "Invalid getTilingPatternIR /TilingType value." thrown in mozilla/pdf.js.

Source

Thrown at src/core/pattern.js:1266

  // in `pattern_helper.js` (fixes issue8330.pdf).
  if (!bbox || bbox[2] - bbox[0] === 0 || bbox[3] - bbox[1] === 0) {
    throw new FormatError(`Invalid getTilingPatternIR /BBox array.`);
  }
  const xstep = dict.get("XStep");
  if (typeof xstep !== "number") {
    throw new FormatError(`Invalid getTilingPatternIR /XStep value.`);
  }
  const ystep = dict.get("YStep");
  if (typeof ystep !== "number") {
    throw new FormatError(`Invalid getTilingPatternIR /YStep value.`);
  }
  const paintType = dict.get("PaintType");
  if (!Number.isInteger(paintType)) {
    throw new FormatError(`Invalid getTilingPatternIR /PaintType value.`);
  }
  const tilingType = dict.get("TilingType");
  if (!Number.isInteger(tilingType)) {
    throw new FormatError(`Invalid getTilingPatternIR /TilingType value.`);
  }

  return [
    "TilingPattern",
    color,
    operatorList,
    matrix,
    bbox,
    xstep,
    ystep,
    paintType,
    tilingType,
    needsIsolation,
  ];
}

export { clearPatternCaches, getTilingPatternIR, Pattern };

View on GitHub (pinned to 5903d58d58)

Solutions

  1. Set /TilingType in the tiling pattern dictionary to 1 (constant spacing), 2 (no distortion), or 3 (constant spacing, faster tiling); any other value is invalid.

When it happens

Trigger: Thrown at src/core/pattern.js:1266 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mozilla/pdf.js@5903d58d58 (2026-08-13). Data as JSON: /api/errors/c28177d883d9123e. Report an issue: GitHub.