Free Support Forum - aspose.com

Saving to PDF. Troubles with font

Hello! Got this error trying to save xls as pdf.

Aspose.Cells.CellsException: Font 'Aharoni' does not support style 'Regular'.

at xf1e06fd8be9d8c69.xd285aa8659b8b74e.x0acd3c2012ea2ee8(Stream xcf18e5243f8d5fd3)

at Aspose.Cells.Workbook.Save(Stream stream, FileFormatType fileFormatType)

How can i avoid this exception and save file?

With respect,
Michael

Hi,

Please try the attached version (last fix v4.8.1.2) if it works fine.

If you still find the issue, we appreciate if you could post your template excel file here to show the issue, we want to test the conversion(xls2pdf) at our end.

Thank you.

Hello!

Thank you for prompt answer! Newer version failed too. See the stack-trace. The problem file is attached.

Aspose.Cells.CellsException: Font 'Aharoni' does not support style 'Regular'. at System.Drawing.Font.CreateNativeFont()


at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)

at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)

at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style)

at xcfc89de1049abe88.x752b3b8e63f08c1b..ctor(String name, Single sizeInPoints, FontStyle style)

at xcfc89de1049abe88.x752b3b8e63f08c1b.x9059a3203c8fc855(String xc15bd84e01929885, Single xa03db8a5ee939042, FontStyle x44ecfea61c937b8e)

at xf1e06fd8be9d8c69.xa6aff5d737fd1242.xb48a4384d8256a54(xb557d6548543dce6 x6955cdd6dea28b8b, Double[] x03075be1e62b75bf)

at xf1e06fd8be9d8c69.xa6aff5d737fd1242..ctor(ArrayList dataFormatRuns, Single cellWidth, TextAlignmentType hAlignment, x5c28847d79b605a8 cellInfo, Double[] scale)

at xf1e06fd8be9d8c69.x58ebfd1f08d54fca..ctor(ArrayList dataFormatRuns, x5c28847d79b605a8 cellInfo, Single Width, Single Height, Double[] scale)

at xf1e06fd8be9d8c69.x281507cee9e12bb9.xf9844e1db8047750()

at xf1e06fd8be9d8c69.xd285aa8659b8b74e.x0b596ff29e972dc0(x5c28847d79b605a8 xc4aabdaa13560452, Int32 xa364300db00bde74)

at xf1e06fd8be9d8c69.xd285aa8659b8b74e.xf11889b309a14c60(XmlNode xda5bf54deb817e37, Int32 x3e0a106e44f5f6eb, Int32 x6155c61fc47ceb1a, Int32 xa364300db00bde74, Int32 x433508a87b1e0cdf, Int32 x8e5bc30d03570f25, Double xa062f5c75232988c)

at xf1e06fd8be9d8c69.xd285aa8659b8b74e.x7c61808921e5b719(XmlNode xda5bf54deb817e37, x1ac1cdde23ba6178 x5c0499d9a53ac586)

at xf1e06fd8be9d8c69.xd285aa8659b8b74e.x51ee56decc29a9da(XmlNode xc301afa072787492, XmlNode& xda5bf54deb817e37, x1ac1cdde23ba6178 x5c0499d9a53ac586)

at xf1e06fd8be9d8c69.xd285aa8659b8b74e.xd42bb424e46c7117(XmlNode xc301afa072787492)

at xf1e06fd8be9d8c69.xd285aa8659b8b74e.x6210059f049f0d48()

at xf1e06fd8be9d8c69.xd285aa8659b8b74e.x0acd3c2012ea2ee8(Stream xcf18e5243f8d5fd3)

at xf1e06fd8be9d8c69.xd285aa8659b8b74e.x0acd3c2012ea2ee8(Stream xcf18e5243f8d5fd3)

at Aspose.Cells.Workbook.Save(Stream stream, FileFormatType fileFormatType)

With respect,
Michael

Hi Michael,

Thank you for considering Aspose.

Well, I checked your template file with the latest version of Aspose.Cells (attached by Amjad) and the file gets converted fine. Please check the attached resultant file. Please make sure to update the reference of the new Aspose.Cells dll in your application. Following is my sample code to generate the PDF file.

Workbook SourceBook1 = new Workbook();

SourceBook1.Open("C:\\PDF\\summer-reading-orderform\\summer-reading-orderform.xls");

SourceBook1.Save("C:\\PDF\\summer-reading-orderform\\summer-reading-orderform.pdf", FileFormatType.Pdf);

Thank You & Best Regards,

Hi Michael,

Thank you for considering Aspose.

After further investigation, we have found your mentioned issue. We will further look into your issue and get back to you soon. We have registered your issue in our issue tracking system with issue id CELLSNET-12009.

Thank You & Best Regards,

Tested the attached file on two computers with the same result. It still fails with the same error. Windows XP sp3.

Michael

Hi Michael,

Thank you for considering Aspose.

As I mentioned in my previous post, we have found your mentioned issue. We will provide a fix for it soon. We have registered your issue in our issue tracking system with issue id CELLSNET-12009.

Thank You & Best Regards,

Hi,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. We have fixed your mentioned issue regarding font.

Thank You & Best Regards,

Thank you very much!

Michael

The issues you have found earlier (filed as 12009) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.