Skip to content

[Due for payment 2026-07-07] [PDF Viewer] Black text disappears from certain PDF receipts after they finish rendering (web) #94484

Description

@melvin-bot

Problem

Certain PDF receipts viewed in New Expensify (web) render incorrectly: while the
PDF is loading, the text is briefly visible, but once it has fully loaded the
black text on the receipt disappears, leaving a blank/near-blank page. The same
PDFs display correctly in Expensify Classic.

This only affects some PDFs — it appears to be font-specific. PDFs using a
different embedded font render fine. The blank/blink behaviour does not reproduce
in macOS Preview, so it looks specific to how we render the affected fonts.

Observed workarounds / clues reported

  • Hovering over the receipt thumbnail shows the content correctly.
  • Opening the receipt shows the text briefly during load (while the green progress
    bar is shown), then it vanishes when rendering completes.
  • Navigating to the next receipt and back makes the text reappear.

Expected

PDF text renders and stays visible after the document finishes loading, matching
Classic and other PDF viewers.

Actual

Text flashes in during load, then disappears once the PDF fully renders. Re-rendering
(navigate away + back) restores it.

Platforms

  • Web / Desktop (New Expensify)
  • Other platforms not yet confirmed.

Technical notes

New Expensify renders PDFs on web via react-pdf + pdfjs-dist (^5.5.207).
The symptoms (text visible mid-load then cleared on completion, font-specific,
fixed by a re-render) point to a text-layer / embedded-font rendering issue in
the pdf.js pipeline rather than a data problem. A good starting point would be
src/components/PDFView / src/components/PDFThumbnail and the pdf.js text-layer

  • cmaps/font handling.

Repro file

A sample PDF that reproduces the issue is available but cannot be shared
publicly
(client document). It can be shared privately with the engineer who
picks this up.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2Task

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions