打开字节文档时出错 'bad allocation'

This article was translated from English: Does it need improvement?
Translated
View the article in English

处理大型PDF文档对于某些企业来说可能非常关键。

在使用IronPDF加载现有PDF文件时,IronPDF会分配一部分内存来存储加载的PDF。 在32位上运行的应用程序每个进程有2 GB的内存限制。 加载超过500 MB的PDF文件可能会超出这个限制,导致“坏分配”异常。

异常消息:

IronPdf.Exceptions.IronPdfNativeException: 'Error while opening document from bytes: 'bad allocation'.

解决方案

要解决此问题,请将应用程序设置为64位