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
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
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 Owner
Current Issue Owner: @mallenexpensify
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
bar is shown), then it vanishes when rendering completes.
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
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/PDFThumbnailand the pdf.js text-layerRepro 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 Owner
Current Issue Owner: @mallenexpensify