Share via

Windows.Data.Pdf does not render correctly with

Jérôme S 25 Reputation points
2026-04-24T14:09:08.2166667+00:00

The PDF file attached contains text using the following fonts:

User's image

It is renderer correctly in various applications (firefox, edge, adobe acrobat):

enter image description here

however when I render it in my app using Windows.Data.Pdf library, the text isn't correctly displayed:

enter image description here

Is this supported?

Please find the file here: pdf missing fonts.pdf

Developer technologies | Universal Windows Platform (UWP)
0 comments No comments

Answer accepted by question author

  1. Noor Fatima 85 Reputation points
    2026-04-25T09:33:53.82+00:00

    This appears to be a known limitation of the Windows.Data.Pdf rendering engine. Since it relies on an older PDF engine, it may not fully support certain embedded fonts or custom font encodings, which can result in missing characters or square box rendering.

    If the PDF displays correctly in modern viewers like browsers or Adobe Acrobat, the issue is likely not with the file itself but with the API’s rendering capabilities.

    As a workaround, you might consider regenerating the PDF using more standard or widely supported fonts, or switching to a more modern rendering solution (for example, one based on Chromium/PDFium) if your application allows it.

    Ensuring compatibility with common font sets can also help avoid such issues in cross-platform scenarios.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-24T14:09:25.71+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Windows.Data.Pdf is implemented on top of the legacy Microsoft Edge PDF engine. That implementation has known rendering limitations and font issues and does not fully support all PDFs or font encodings.

    The behavior shown (text rendered as square boxes while other viewers display it correctly) is consistent with these limitations. In particular, Windows PDF APIs can render some characters as square boxes when fonts or font encodings are not handled correctly, and the guidance for developers is to rely on better-supported font stacks or different rendering technology.

    This means that PDFs like the one provided, which use specific embedded fonts and custom encodings, are not reliably supported by Windows.Data.Pdf.

    Workarounds:

    1. Regenerate the PDF using different fonts or font settings that are known to work with Windows PDF APIs (for example, standard system fonts recommended for Windows 10 apps).
    2. If the app can be changed, switch to a PDF rendering solution based on the same technology as the new Chromium-based Microsoft Edge, which uses the open-source PDFium library and provides more robust PDF and font handling.
    3. When designing or exporting PDFs for use with Windows.Data.Pdf, avoid font/encoding combinations that trigger missing-glyph “square box” behavior and prefer fonts from the Windows 10 recommended font list.

    In summary, the incorrect rendering observed is a limitation of Windows.Data.Pdf rather than a bug in the PDF itself, and full support for these fonts/encodings is not available in that API.


    References:

    2 people found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.