We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF to Image (DotNetCore 2.1) - ERROR:region.c:1155:GdipCombineRegionPath: assertion failed: (region->bitmap)


Thanks for sharing the crash report.

We have logged it as well and will consider it during investigation and let you know about the resolution status of the ticket as soon as we have some updates.

@asad.ali what’s the best way to escalate this? Could purchasing paid support help? This issue makes our service completely unusable atm, and we run out of ideas about what else to try

We tried to extract first page image preview using other vendor (ironpdf) with same document that crashes our our workers - and it worked. So this is not just document, something wrong with library.


We will surely investigate the ticket as per your feedback and shared information.

You may please check our priority support option (As already shared in our previous comments) where issues are dealt with high precedence. In case you need further information, please feel free to let us know.

Just to comment on this issue. I was having the same issue, I detected this error is coming from the libgdiplus library. So initially I was using libgdi library version 4.2-1. I changed the source to download a newer version of libgdiplus version 6.0.4 to be exact and I stopped having this issue.


It is good to know that your issue has been resolved and your comments under this thread are really appreciated. They would really be helpful for those who are facing similar issue.

Hi, I am also running into this error. Is there a fix available? I have tried updating libgdiplus but that doesn’t solve the issue for me. Thanks.

There are more than one reasons why you might end up with a maximum size limit issue. Instead of installing libgdiplus I downloaded libgdiplus source code, increase the memory size and recompiled.

This is the script that I added inside the docker file

#update libgdiplus with custom install
RUN apt-get update
&& apt-get install git -y
&& apt-get install libgif-dev autoconf libtool automake build-essential gettext libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev -y

#clone libgdi plus source code
WORKDIR /usr/local/share
RUN git clone https://github.com/mono/libgdiplus

#patch max memory size
WORKDIR /usr/local/share/libgdiplus/src
RUN sed -i ‘s/1024/10240/g’ region-bitmap.h

WORKDIR /usr/local/share/libgdiplus
RUN sh autogen.sh
&& make
&& make install

WORKDIR /usr/local/share
RUN rm -r libgdiplus


Would you please confirm if you were able to resolve the issue by the workaround that you have shared?

Is there an update about this? We are having the same issue.

Kind Regards.


We are afraid that the earlier logged ticket is not yet resolved. Please note that it is related to specific environment which makes it complex and hard to investigate as we are unable to reproduce this error on our end. Possible reasons of this issue may be incorrect installation of libgdiplus package (as already discussed in this thread and some of the users were able to resolve it). We will surely post an update here once we make some significant progress towards resolution of the linked ticket.

We apologize for the inconvenience.

I have tried the above suggestions but they don’t fix the issue.
I have a reproduction case. Attached is a zip file which contains a complete Visual Studio solution with example pdf and dockerfile. You need docker installed with linux containers.
Then you should be able to run it by just pressing F5. And then the app crashes and in the output window these messages are shown:

** (process:350): WARNING **: 11:53:26.750: Path conversion requested 20751360 bytes (1920 x 2702). Maximum size is 8388608 bytes.
ERROR:region.c:1155:GdipCombineRegionPath: assertion failed: (region->bitmap)
The program ‘dotnet’ has exited with code 0 (0x0).

AsposePDFCrash.zip (1.8 MB)

Can you have a look at this repo case?

Btw, if we renew our license do we have paid support? Or do we need to buy additional paid support?

Kind regards


We have logged a separate issue as PDFNET-44940 in our issue management system for the sake of investigation against your case. The ticket information has been updated accordingly as well. We will further look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We apologize for your inconvenience.

The paid support subscription does not come with normal license. You will have to purchase it separately. For further information, you can please contact our Sales Team.



我们担心较早记录的票证尚未解决,这就是您在使用 21.9 版本时也面临此问题的原因。但是,我们已经记录了您的疑虑,并且一定会在票务调查期间处理它们。一旦问题得到解决,我们会通知您。请给我们一些时间。


What is the status of this issue? We have just purchased a new license and tested with the latest version but the problem still occurs.


The earlier logged ticket is under the phase of investigation. We have logged your concerns under the ticket as well and will consider them during investigation. We will surely share some news about fix ETA as soon as investigation against the issue is complete. We highly appreciate your patience and comprehension in this regard.

We apologize for the inconvenience.


Is there any update on this issue?
This issue becomes more and more serious to us as when it happens, it makes the whole process stop working.
I greatly appreciate if this can be prioritized.



We do understand and realize the severity of the issue for you. Please note that we have been investigating the ticket PDFNET-44940 and due to its complex nature and other issues in the queue, it could not get resolved. We have escalated the issue priority to the next level and will surely let you know once we make more progress towards issue resolution. We appreciate your patience in this matter.

We apologize for the inconvenience.

Hi team,
While waiting for your investigation, we’ve workaround by reducing image’s size to satisfy the limitation of bitmap’s size of libgdiplus.

using(var pdfDocument = new Document(input))
string extension “.bmp”;
ImageDevice imageDevice = new BmpDevice(1216,1720);
foreach(Page page in pdfDocument.Pages)
using(var imageStream = new FileStream(Path.Combine(outputFolder, “page” + ‘_’ + page.Number + extension), FileMode.Create))
imageDevice.Process(page, imageStream);

With the success.pdf, it works fine and results in output files in the size of (1216x1720).
But with the fail.pdf, the issue mentioned above still occur in detail:

** (process:16419): WARNING **: 14:55:26.533: Path conversion requested 412608 bytes (1536 x 2149). Maximum size is 262144 bytes.
Segmentation fault (core dumped)

success.pdf (113.0 KB)
fail.pdf (231.9 KB)

I have no idea what (1536 x 2149) is.
Can you guys clarify this behavior?