Arial Font cause 100% CPU usage

Hi all

I’m currently evaluating the Aspose.PDF component. I am very enthousiastic about all the possibilities of the component.
But I do have problems with the fonts. When I run my code without the arial font declation. It all runs ok, but when I try to set the font to Arial I get problems. The code builds fine, the code doesn’t produce an error, but the aspnet_wp process causes 100% CPU time and it stays like that.

can anyone give some advise how to use the arial font?

kind regards,
Dennis vB
--------------------
I have the following xml:





-------------------------------------------------
And in the codebehind:
Pdf pdf = new Pdf();

string path = ConfigurationSettings.AppSettings[“PdfXmlPath”];

string xmlFile = path + “projectinfo.xml”;
pdf.BindXML(xmlFile, null);

Text text1 = new Text(section);
section.Paragraphs.Add(text1);

Segment segment1 = new Segment(text1);
text1.Segments.Add(segment1);
segment1.TextInfo.FontName = “Arial”;

segment1.TextInfo.TruetypeFontFileName = @“c:\winnt\fonts\Arial.ttf”;
segment1.Content = “This must be in arial”;

pdf.Save(fileLocation);



--------------

Dear Dennis,

Thank you for considering Aspose.

Are you sure the problem is caused by Arial font? Would you please test the code in a windows application instead of ASP.NET application? I have once encountered the 100% CPU usage problem when using ASP.NET and it even made my system halted. I don’t know why it occurs, but I don’t think it has anything to do with Aspose.Pdf because when I don’t use Aspose.Pdf it still occurs.

Hi
I think I discovered why I got a 100% CPU usage.
When I changed the text to arial, the text became bigger than in the standard font.
Because the text was placed in a tablerow and the page was quite small and the text too big, the PDF writer wanted to add it to a new page in the section, but again, the text was too big and the PDF writer wanted to add new page, and so on and so on.
Do you think this theory can be true? I solved the problem to set the margins a bit smaller and I cut the text in halves.

kind regards,
Dennis vb

Dear Dennis,

Thank you for considering Aspose.

Would you please send me an example which can reproduce the error?