Skip to content

[Bug]: Printing issue: large margins added on bottom and right when printing some PDFs via Firefox PDF.js #19983

Open
@mrtcode

Description

@mrtcode

Attach (recommended) or Link to PDF file

When printing certain PDFs using PDF.js in Firefox (tested with the built-in viewer), the content does not scale properly to fit the page. Specifically, it creates large margins on the bottom and right sides of the page, and the document appears shrunken in the top-left corner.

The same PDF prints correctly with no margin issues in other PDF viewers

1981_13.pdf

Web browser and its version

141.0a1, 128.6.0esr

Operating system and its version

macOS 15, Windows 11

PDF.js version

5.3.33, 4.4.10

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Open the attached PDF in Firefox
  2. Print using the default or “Fit to page” settings
  3. Observe the large white margin at the bottom and right sides

What is the expected behavior?

No margins at the bottom and right sides.

What went wrong?

Image

Link to a viewer

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions