Aspose Cells .NET Core 2.1 saving workbook as PDF fails on Linux box

@rw3,

You may please send us a file which is converted fine to PDF using Excel but warning and large text issues are there while using Aspose.Cells. It will help us to compare the output files created by Excel and Aspose.Cells and provide assistance accordingly.

Actually there is the excel application involved, our application uses aspose.cells which reads “TMP - Plan Call Page.xlsm” file and populates data from DB and saves it to .pdf files. I am attaching the intermediate .xlsx files(“TMP - Plan Call Page.xlsm” -> xlsx instead of PDF) so it might be useful for your troubleshooting. Hopeful that clears it up.

Attaching other files created without second warning.
Sample Files.zip (348.1 KB)

@rw3,

We have analysed the sample files, but as these are created without the second warning at your end, therefore no issue is observed in the converted PDF files using Excel and Aspose.Cells both. I am afraid that these files are not sufficient for reproducing the issue. Until and unless we get sample file which is converted fine using Excel but fails using Aspose.Cells, we may not be able to provide some feedback. As issue is logged for the first warning, you may please wait until we provide some feedback about this issue. Or arrange some sample file as mentioned above, we will try to analyse that issue as well. We are afraid that without the appropriate sample file, we may not be able to provide our feedback.

OK make sense, I will wait until the first issue is resolved to see if the second one happens again after that.

@rw3,

We have tested the case with file “PC 341710.xlsx”, and got the warning “WARNING **: NOT IMPLEMENTED: GdipWidenPath”.

1: The warning happens because of this function:
System.Drawing.Drawing2D.GraphicsPath.Widen(Pen pen);
This function is provided by System.Drawing.common lib on Linux. It works fine on windows, but on Linux, if we call this function, it will show up this warning.
These days we tried to remove this function from Linux code, but there are quite a few call of this function, to avoid causing errors, we suggest to ignore this warning on Linux, if it does not cause any errors.

2: The condition of big font, we also checked it, in file “PC 341710.xlsx”.
First, you can open this file in excel2013, and see “print view”, you can also see the big font in print view.
Then, in Excel2013, open the “PAGE LAYOUT” - “page setup” window, in “Header/Footer”, you can see a very long text, that’s where the Big Font from. Remove the long text from “Header/Footer”, the big font has gone.

We think the big font is not created by the warning of “WARNING **: NOT IMPLEMENTED: GdipWidenPath”. And if this warning does not cause any errors, we suggest to ignore it until System.Drawing.common lib implements it.

  1. I am guessing “WARNING **: NOT IMPLEMENTED: GdipWidenPath” warning causes the chart y axis text to get cut off in the pdf version. If its not, let me know how to resolve the issue.

  2. Large font issue is not caused by “WARNING **: NOT IMPLEMENTED: GdipWidenPath” but it happens when the second warning shows up “WARNING **: Requested 0 bytes. Maximum size for region is 262144 bytes”. Just to reiterate on how the pdfs are created:
    a. Data from db is read into business objects
    b. using aspose.cells, business objects data is populated into “TMP - Plan Call Page.xlsm”, and that populated workbook stream is saved into pdf. Here is the code snippet to save as pdf: workbook.Save(localPDFPath, SaveFormat.Pdf);
    All of that happens in the stream itself, there is no excel file with large font, hope that clarifies it. I created the excel instead of pdf thinking it will be helpful for you guys to troubleshoot the issue. There is no large font issue in the “TMP - Plan Call Page.xlsm”, but the aspose generated excel or pdf has the issue in certain cases.

@rw3,

Thanks for sharing your concerns. We are analysing them and will share our feedback soon.

@rw3,

Please try our latest version/fix: Aspose.Cells for .NET Core v18.12.4:
Aspose.Cells18.12.4 For .NetStandard20.Zip (3.8 MB)

In this fixed version, we fix the warning “WARNING * : NOT IMPLEMENTED: GdipWidenPath”.
You can open the file “PC 341710.xlsx”, and save it into PDF, the warning “WARNING * : NOT IMPLEMENTED: GdipWidenPath” has gone.
(That is the only warning we get, we did not get the second warning " WARNING **: Requested 0 bytes. Maximum size for region is 262144 bytes.")

As you have told us that you get data from db into “business objects”, then save “business objects” into workbook stream, probably, the second warning occurs only when you get data from db into “business objects”, or when you save “business objects” into workbook stream, but we can not reproduce the step.

We suggest using 18.12.4 to observe if the problem has been improved.
If there is still Big Font in xlsx file, we hope we can get more information for help on version 18.12.4.

I no longer see both the warnings and larger font issues, thank you!!!

@rw3,

Good to know that your issue is sorted out by the suggested version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Hello,

Our testing team found some labels truncation issue between windows vs linux created files. I am attaching a sample linux and windows files to show you guys the difference.

Sample files.zip (436.8 KB)

In PC 37_xxx.pdf, navigate to page 8, “% Change by SKU” label is cut off in linux version and also same charts windows version shows two lines of text in x-axis but linux is showing just one line.

In PC 419_xxx.pdf, if you scroll to last page, both the bar chats x-axis labels are cutting off in linux version.

You already have the template xlsm file we use to create these reports, but let me know if you guys need any other details.

@rw3,

Thank you for the feedback. I am afraid that I could not find any EXCEL files named PC 37_xxx and PC 419_xxx in the available samples you sent us earlier. Could you please send us these files which are referred above?

Hello, I mentioned those are PDFs(PC 37_xxx.pdf) not excel. Not sure where you got that those are excel files.

xxx is either Linux or Windows so an example would be “PC 37_Linux.pdf”

We have a template file in xlsm format, thats populated with data and saved as pdf. I am attached the template as well. TMP - Plan Call Page.zip (33.6 KB)

@rw3,

We are afraid to share that we are not able to reproduce this issue using any of the available sample files. It is requested that as this thread has become too long therefore it has become difficult to maintain it. You may please create a separate new thread and provide relevant sample Excel file, output PDF file and sample code for our reference. We will use that information to reproduce the scenario and provide assistance at the earliest.

We are sorry for the inconvenience caused to you in this regard.

No worries, I created a new thread, thanks

@rw3,

Thanks for creating the new thread.