{"record":{"id":"c2d1b0fdb377e0bd","repo":"mozilla/pdf.js","slug":"bad-filter-name-filter","errorCode":null,"errorMessage":"Bad filter name \"${filter}\"","messagePattern":"Bad filter name \"(.+?)\"","errorType":"exception","errorClass":"FormatError","httpStatus":null,"severity":"error","filePath":"src/core/parser.js","lineNumber":817,"sourceCode":"        warn(\"/DecodeParms should not be an Array, when /Filter is a Name.\");\n      }\n      return this.makeFilter(\n        stream,\n        filter.name,\n        length,\n        params,\n        cipherTransform\n      );\n    }\n\n    let maybeLength = length;\n    if (Array.isArray(filter)) {\n      const filterArray = filter;\n      const paramsArray = params;\n      for (let i = 0, ii = filterArray.length; i < ii; ++i) {\n        filter = this.#fetchIfRef(filterArray[i]);\n        if (!(filter instanceof Name)) {\n          throw new FormatError(`Bad filter name \"${filter}\"`);\n        }\n\n        params = null;\n        if (Array.isArray(paramsArray) && i in paramsArray) {\n          params = this.#fetchIfRef(paramsArray[i]);\n        }\n        stream = this.makeFilter(\n          stream,\n          filter.name,\n          maybeLength,\n          params,\n          cipherTransform\n        );\n        // After the first stream the `length` variable is invalid.\n        maybeLength = null;\n      }\n    }\n    return stream;","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/mozilla/pdf.js/blob/5903d58d58e4dd9ce6ffa3834aea8480f06b4ada/src/core/parser.js#L799-L835","documentation":"Error \"Bad filter name \"${filter}\"\" thrown in mozilla/pdf.js.","triggerScenarios":"Thrown at src/core/parser.js:817 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the stream's /Filter entry: it must be a valid filter name (e.g. FlateDecode, DCTDecode, JPXDecode) or an array of valid names.","Remove or correct misspelled or unsupported filter names in the PDF."],"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"}