Fixing Missing Text with Specific Cultures
Environment
| Version | Product | Author |
|---|---|---|
| 2024.3.806 | RadPdfProcessing | Desislava Yordanova |
Description
When loading some PDF documents with German culture, part of the text got missing. It is possible to observe the following error:
The dimensions of this page are out-of-range. Page content might be truncated.
When importing a PDF file using RadFixedDocument with PdfFormatProvider, the document may recognize an incorrect size. For example, an A4-sized document may display a width value thousands of times larger than expected. This issue can occur due to culture settings on the machine (e.g. German).
This knowledge base article also answers the following questions:
- How to fix the incorrect document size when using PdfFormatProvider in RadFixedDocument?
- Why does RadFixedDocument import PDFs with wrong size values?
- How to ensure the correct document size during import with RadFixedDocument?
Solution
To resolve the incorrect document size issue, follow these steps:
Option 1: Set English Culture Before Import
Add the following code before loading the document:
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
Option 2: Version Upgrade
- Download and install the preview version 2024.4.1127 (or newer).
- Use this version to render and process the PDF.