Out of memory error when adding image to table cell that spans many rows/columns

OOMErrorSampleCode.zip (1.2 KB)

I’ve attached sample code and an image which duplicates the problem. What we’ve found locally is we need to lower the row span to < 17 in order for the report to run but we’d like to see what can be done to resolve it so we don’t have to.

@locke1234

We are checking it and will get back to you shortly.

@locke1234

We tried to test the scenario in our environment by lowering the rowspan as below but it still did not generate any output:

var imageCell = tab1.Rows[0].Cells[0];
imageCell.RowSpan = 16;
imageCell.ColSpan = 17;
imageCell.Paragraphs.Add(img);

Can you please share at which value the PDF is being generate correctly at your end?

@asad.ali

A rowspan and colspan of 1 technically completes without error, but the resulting image is not what it needs to be (anything larger and a 1x1 col/row span results in an OOM error eventually if it doesn’t just crash the machine running it). While I sent you a large rect image as an example the actual image is a client-supplied chart that needs to be a certain size to be legible.

@asad.ali

If I shrink the size of the image as well, then it can span more.

Ex. If I set FixWidth = 524 and FixHeight = 130, then at least a row/col span of 10/10 completes without error (image does not look great, though).

So whatever the problem is it’s likely a function of image size and span length/height.

@locke1234

We were able to reproduce the issue in our environment. Therefore, it has been logged as PDFNET-52211 in our issue tracking system for further investigation. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

@asad.ali

Howdy, my manager wanted me to reach out to see if you could provide some kind of an eta on when the problem might be resolved.

Thank you

@locke1234

The issue has recently been logged in our issue tracking and its investigation is pending. We will analyze and resolve it on first come first serve basis. We are afraid that we cannot share any ETA before the investigation is complete. We will however inform you via this forum thread as soon as we have some updates in this regard.

We apologize for the inconvenience.

@asad.ali

Hello, my manager just wants me to keep checking up on this since it’s blocking a client of ours.

Thank you

@locke1234

We are afraid that the ticket has not been yet resolved. As shared earlier, it will be resolved on first come first serve basis and there are other issues in the queue logged prior to it. However, if issue is a showstopper for you, you can please check our paid support option where issues are resolved on urgent basis. Furthermore, we will inform you once we have some updates about issue fix.

We apologize for the inconvenience.

Thanks @asad.ali. Any chance you could tell us what relative position we are in the bug queue?

@locke1234

We are afraid that no progress has been made in terms of the ticket resolution yet. However, we will inform you via this forum thread once some significant updates are available about issue fix.

We apologize for the inconvenience.

The issues you have found earlier (filed as PDFNET-52211) have been fixed in Aspose.PDF for .NET 22.10.