Error while opening document from bytes 'bad allocation'

Processing large PDF document can be very crucial for some businesses.

When using IronPDF to load an existing PDF file, IronPDF allocates a portion of memory to store the loaded PDF. Applications running on 32-bit have memory limit of 2 GB per process. Loading a PDF file larger than 500 MB can exceed this limitation, resulting in a 'bad allocation' exception.

Exception message:

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

Solution

To solve this, please set the application to run on 64-bit.