Workbook Save with SaveFormat as Pdf throws Null reference exception

Hello,

We're a licensed customer of Aspose and facing a issue for which we urgently need a resolution.

On saving the workbook as PDF format, we're getting Object reference not set to an instance of an object.

Resolution that I have tried so far.

1. Downloaded the latest Aspose cell version which did not help.
2. Setting the cellhelper.fonts to ..\windows\fonts directory which did not help
3. Setting OnePagePerSheet property of PdfSaveOptions to true which did not help.


I am attaching a test project along with a template, please provide us a resolution asap.

Thanks.





Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have checked your code. No exception is found after executing the code. Please download and use the latest version Aspose.Cells
for .NET v7.4.2.2
to see if it resolves your issue at your end.

Hi,


I have already downloaded Aspose.Cells for .NET v7.4.2.2 and it doesnt work. I have added the set of dlls that you have provided in the project and it doesn’t build now.

I am using windows 7 professional SP1 if that helps.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try this fix: Aspose.Cells for .NET v7.4.2.3 (Client Profile) and let us know your feedback.

Same issue.


Object reference not set to an instance of object.

Please tell me some workable solution.

Hi,

Thanks for your posting and considering Aspose.Cells.

We have logged your issue in our database. We will look into your issue and help you asap. This issue has been logged as CELLSNET-41544.

Once, we will have any update relating to this issue, we will share it with you asap.

Hi,


Thank you.

I hope this can be resolved quickly.

System configuration:
Windows 7 professional



Hi,

Thanks for your posting and using Aspose.Cells.

Sure, Once, it is resolved or we have some update for you relating to it, we will let you know asap

Hi,

We found that you use “News Gothic Std.otf” in your Excel file and currently Aspose dose not support otf font.

Please convert News Gothic Std.otf to ttf using tools (http://www.font2web.com/) and reinstall it and we think the issue will be resolved.

Thanks a lot dude.


It works now.

Great work.

Hi,

We are pleased to know your issue is resolved now. If you face any other issue, please feel free to post on our forums, we will be glad to help you more.

Hi, I am a colleague of asspos working on the same project.

Regarding this issue with OTF fonts, we still don’t understand why the same file is exported to pdf successfully on one machine and throws an exception on another machine?

So, I have a xls file, which contains OTF. You are saying the the root cause of the problem is that “currently Aspose dose not support otf font.”
How come, on THE SAME file, Aspose.Cell throws on one machine and works as expected on another machine?
Workbook.Save(pdfFileName, new PdfSaveOptions(SaveFormat.Pdf){CalculateFormula = true, RefreshChartCache = true});

IS there anything else we can do to work around this issue besides installing the font on all user systems?

Thanks!



Hi,

Thanks for your posting and using Aspose.Cells for .NET.

If you want to convert your document to pdf, font must be installed on your machines. Without fonts installed, conversion is not possible. However, we are coordinating with development team regarding your issue. Once we will have any update relating to it, we will let you know asap.