Problem with very large bitmaps

Hello,
i am trying to export an image of the hole document.
The image size can be 10000*10000 pixel or more.

When i use the GoView.Get<span =“highlight”>BitmapFromCollection method, sometimes it thows the following exception:

System.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
   at WindowsApplication1.Form1.button1_Click(Object sender, EventArgs e)

Is there another way to export large Bitmaps?

Thanks, Andreas

That’s a GDI+ error because you are trying to create a Bitmap with a dimension that is greater than 32767 or so. I hope you realize that you might be trying to allocate a Bitmap that is bigger than will fit in virtual memory on a 32-bit system.
I assume you are calling the overload of GetBitmapFromCollection that takes four arguments. The other overloads limit the size of the Bitmap to 2000x2000 pixels.
I suggest you scale down the dimensions and pass that factor as the “scale” argument to GetBitmapFromCollection.