Skip to content

[Feature]: Show page-span indicators in the document outline sidebar #21509

Description

@WASIDJ

Is the feature relevant to the Firefox PDF Viewer?

Yes

Feature description

For long PDFs, the document outline shows the hierarchy of sections, but it is hard to quickly understand how much of the document each outline item occupies. A lightweight visual page-span indicator in the outline sidebar would make long technical books, manuals, and papers easier to navigate.

The proposed UI is a small, non-intrusive bar shown next to each outline item, either in a left gutter or on the right side of the item. The bar would represent the relative page span covered by that outline item.

For example:

  • top-level outline items could show their span relative to the whole document;
  • nested outline items could optionally show their span relative to the parent section;
  • the indicator should stay subtle and not replace the existing outline title, expand/collapse controls, or current-outline-item highlight.

This is useful because a reader can immediately distinguish a short preface, a small appendix, and a very large chapter without expanding many nested items or jumping around the document.

Current workarounds are limited:

  • use thumbnails, which show page count but not semantic structure;
  • use the outline, which shows structure but not section length;
  • manually jump through outline entries and infer length from page numbers.

A possible implementation could compute each outline item's start page from its destination and infer its end page from the next relevant outline item, then render a proportional CSS bar. Since similar outline-to-page mapping can be expensive for large documents, this should probably be initialized lazily when the outline view is opened, and should avoid triggering unnecessary data fetching. It may also need to be disabled or degraded when disableAutoFetch is set, similar to the current-outline-item feature.

Related context:

Other PDF viewers

I am not aware of another PDF viewer that implements exactly this. The intended effect is a subtle page-span bar behind or beside outline items, making chapter size visible at a glance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions