Preventing HTML to PDF Rendering Crashes in .NET Framework
HTML to PDF rendering crashes or hangs unexpectedly in .NET Framework applications. The crashes occur during PDF generation with no consistent error message.
The "Prefer 32-bit" option is enabled by default in .NET Framework project configurations. A 32-bit process has a 2 GB memory ceiling, which is insufficient for the memory-intensive operations performed by IronPDF's Chrome renderer. When memory pressure reaches the limit, the process crashes.
Solution
Disable the "Prefer 32-bit" setting in Visual Studio project properties:
- Open your project in Visual Studio.
- Go to Project Properties then Build.
- Uncheck Prefer 32-bit.
- Rebuild the application.
This allows the application to run as a 64-bit process with access to the full available system memory, which eliminates the crash.

