Thank you for contacting Aspose support. Please share the crocodoc.ods file used for testing on your end. We will perform tests on our side and share the results here.
Thank you for sharing the sample spreadsheet. I have evaluated the presented scenario on Ubuntu 15.10 against Mono 4.2.1 and latest version of Aspose.Cells for .NET 17.02.1 (attached). I am afraid, I am not able to replicate the said exception on my side. In fact, I am able to generate all images correctly using your original code. Could you please give a try to the latest version on your end as well? In case the problem persists, please share the version of Mono installed on your system along with complete stack trace of exception for further investigation.
I tried referencing the updated DLL and experienced the same issue- however continued to have no issue on Windows/VS2015.
I then decided to try again on a freshly built machine and can get past the Exception error- however the output is garbled, showing only 2-3 lines on a page. I then tried on two other Ubuntu machine with the same results.
The output appears as shown in the attached document.
Interestingly if I comment out the lines that set the Horizontal/Vertical resolution to 200- I just get no content in the JPEG other than the page header.
// options.HorizontalResolution = 200;
// options.VerticalResolution = 200;
I’ve also tried different image formats, upgrading libgdiplus, Ubuntu 16.04 64 bit, Ubuntu 16.04 32 bit. Upgrading Mono to the latest version.
I have attached JPG files with example blank/garbled outputs.
I hope you are able to get to the bottom of the issue as the same code works on Windows VS.NET (although I have a different issue i’ll raise in another post later about images in the spreadsheet not being included in the output JPG), but unfortunately we need this to be installed on existing client servers running as a background process on Ubuntu 16.04 LTS so Mono is the only avenue open to us.
What I understand from your recent post is that you are no longer experiencing the error from your original post while using the latest version of Aspose.Cells for .NET. However, the problem is that your are either getting incomplete rendering or blank pages. Please correct me if I am wrong in my understanding.
That said, I have started downloading the Ubuntu’s VirtualBox image from Google drive. As soon as the download completes, I will perform tests and share my results here.
The original GDI exception appears to be something specific to this dev machine, as it does not happen when I used a freshly built VM’s with either the current Ubuntu 16.04 LTS ISO or the Osbox image I linked to.
Current issue is either blank, or garbled image being output (which changes depending on if I pass horizontal/vertical resolution parameters or not).
Attached is a link to download project files which are more in line with what we are trying to actually build using Aspose (a background daemon that scans and transcodes files to JPEG).
Interestingly Aspose.Words saving as a JPEG works fine- Aspose.Cells still suffers the same problem.
The original GDI exception appears to be something specific to this dev machine, as it does not happen when I used a freshly built VM's with either the current Ubuntu 16.04 LTS ISO or the Osbox image I linked to.
Current issue is either blank, or garbled image being output (which changes depending on if I pass horizontal/vertical resolution parameters or not).
Thank you for the confirmation. I have evaluated both mentioned cases on Ubuntu 16.04 (acquired from Google Drive link) & Mono 4.2.1 against the latest version of Aspose.Cells for .NET 17.02.2 (assembly compiled against .NET framework 4.0), and I am able to notice both problems on my side. In order to further investigate these incidents, I have raised the following tickets for the product team.
CELLSNET-45166: SheetRender.ToImage renders only the page header and footer
CELLSNET-45167: SheetRender.ToImage renders the contents garbled and incomplete
Please spare us little time to further analyze these scenarios and get back with updates.
Attached is a link to download project files which are more in line with what we are trying to actually build using Aspose (a background daemon that scans and transcodes files to JPEG).
Interestingly Aspose.Words saving as a JPEG works fine- Aspose.Cells still suffers the same problem.
When you run the project it will scan for files in the “queue” folder.
It will then attempt to transcode these to JPG and store the images in the “success” folder.
Interestingly when trying to transcode XLSX files it displays a warning message-
“** (process:13441): WARNING **: Requested 0 bytes. Maximum size for region is 262144 bytes.”
No other conversion display a message.
I have tried your recently shared project and I am able to observe the mentioned warning, however, I am not sure why the message appears and if it is related to Aspose.Cells APIs. Could you please simplify the sample project in a way that we are able to find the source code line and sample document that triggers the issue? Please note, we need aforementioned information for investigation and to log a formal request in our bug tracking system for detailed analysis.
Link below is a sample project similar to the original post. Has three spreadsheets saved in different formats (ODS,XLS,XLSX). XLSX generates a warning, the other two do not generate any warning- but none of them renders to a JPG file correctly.
Thank you for sharing the simplified sample project. I have evaluated the case against the latest version of Aspose.Cells for .NET 17.02.3 (published a few hours back), and I am able to notice the said warning on Ubuntu 16.04 with Mono 4.2.1. I have raised this incident with the product team under the ticket CELLSNET-45169. Please spare us little time to further investigate the matter and get back with updates in this regard.