mozilla/pdf.js · error · FormatError

Invalid getTilingPatternIR /BBox array.

Error message

Invalid getTilingPatternIR /BBox array.

What it means

Error "Invalid getTilingPatternIR /BBox array." thrown in mozilla/pdf.js.

Source

Thrown at src/core/pattern.js:1250

      this.bbox,
      this.background,
    ];
  }
}

class DummyShading extends BaseShading {
  getIR() {
    return ["Dummy"];
  }
}

function getTilingPatternIR(operatorList, dict, color, needsIsolation = true) {
  const matrix = lookupMatrix(dict.getArray("Matrix"), IDENTITY_MATRIX);
  const bbox = lookupNormalRect(dict.getArray("BBox"), null);
  // Ensure that the pattern has a non-zero width and height, to prevent errors
  // 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.`);
  }

View on GitHub (pinned to 5903d58d58)

Solutions

  1. Ensure the tiling pattern dictionary contains a /BBox entry that is an array of four numbers defining the pattern cell.

When it happens

Trigger: Thrown at src/core/pattern.js:1250 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/8bc20739f09aa806. Report an issue: GitHub.