Skip to content

[WC-3431]: Doc Viewer Checkbox Fix#2262

Open
samuelreichert wants to merge 3 commits into
mainfrom
fix/WC-3431-doc-viewer-checkbox-fix
Open

[WC-3431]: Doc Viewer Checkbox Fix#2262
samuelreichert wants to merge 3 commits into
mainfrom
fix/WC-3431-doc-viewer-checkbox-fix

Conversation

@samuelreichert

Copy link
Copy Markdown
Contributor

Pull request type

Bug fix (non-breaking change which fixes an issue)


Description

Fix PDF standard font rendering in Document Viewer

Problem: PDFs containing glyphs from ZapfDingbats (e.g. checkmarks generated by .NET PDF libraries) rendered as blank rectangles in Document Viewer. The browser's native PDF viewer displayed them correctly.

Root cause: standardFontDataUrl and cMapUrl were relative paths. The PDF.js worker is loaded from //unpkg.com (cross-origin), so fetch() in the worker context has no document origin to resolve relative URLs against — throwing TypeError: Failed to parse URL.

Fix: Prepend window.location.origin to both URLs, making them absolute and resolvable from any worker origin.

Tested with:

  • Customer W9 PDF (C corporation checkbox now shows as checked ✓)
  • Plain PDF with no form fields (no regression ✓)

@samuelreichert samuelreichert requested a review from a team as a code owner June 12, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant