v1.21.0

firecrawl/pdf-inspectorv1.21.0Sep 19, 2026by abimaelmartell

Upgrading?

AI Summary

This release adds font weight metadata to text items and improves text rendering by excluding off-canvas labels. It also fixes PDF loading to tolerate leading bytes and introduces an opt-in feature to infer boldness from font weights.

Key Highlights

  • Added `font_weight` metadata (100..=900) to text items across Rust, Node, Python, and CLI tools.
  • Added opt-in `bold_from_weight` API to infer boldness from font weights (600 or higher).
  • Fixed text clipping to exclude labels painted wholly outside their rectangular bounds.
  • Improved PDF loading to tolerate leading bytes before the standard `%PDF-` header.

Breaking Changes

  • Rust migration: `TextItem` literals now require `font_weight: None` for items with unknown weight classes.

New Features

  • Font weight metadata support for text items.
  • Opt-in `bold_from_weight` inference for positioned-text and region APIs.
  • Enhanced PDF header detection within the first 1024 bytes.

Full Release Notes

Changes since 1.20.0:

- Add `font_weight`, the font's 100..=900 weight class, to text items in Rust, Node, Python and `pdf2md --items-json`, with an opt-in `bold_from_weight` on the positioned-text and region APIs that reads bold from a weight of 600 or more and keeps runs of different weight as separate items (#536).
- Leave out text painted wholly outside its rectangular clip, so off-canvas labels no longer leak into the surrounding text (#539).
- Tolerate leading bytes before the `%PDF-` header, locating it within the first 1024 bytes as mupdf, pdfium and poppler do (#538).

`bold_from_weight` is opt-in; `is_bold` and item merging are unchanged by default.

**Rust migration:** `TextItem` literals need `font_weight: None` for items whose weight class is unknown.

Release preparation: #546.

[Full changelog](https://github.com/firecrawl/pdf-inspector/compare/v1.20.0...v1.21.0)

Related Repositories