0

I have been using PDF Clown for a few days and am loving the ease of use. I cannot seem to figure out this problem I am having. Whenever the ShowText comes up on the β when using blockcomposer the server goes into an endless loop and I have to manually stop the process. It seems to be getting stuck in the TextFitter.cs class in function the function Fit, but I cannot figure out why.

Here is some sample code

BlockComposer blockComposer = new BlockComposer(composer)
//variableFrame declared elsewhere
blockComposer.Begin(variableFrame, XAlignmentEnum.Left, YAlignmentEnum.Top);
blockComposer.ShowText('\u03B2'.ToString());
blockComposer.End();

Any ideas on how to fix this while keeping in the β(client requirement)?

Thanks.

dda
  • 6,030
  • 2
  • 25
  • 34
kevindstanley
  • 15
  • 1
  • 3
  • It is not at all clear to me from your question whether you're interested in fixing the problem, or working around it. If you want to fix it, the first step would be to analyse what the `Fit` function is doing, *why* it is going into an infinite loop, and you appear to not have investigated that yet. You say you cannot figure out why, but you do not say what you have done to try to figure it out, you do not say where you are getting stuck. –  Jun 05 '13 at 16:18

1 Answers1

0

You can solve your problem by loading some proper .ttf font. I used the arial.ttf from Windows and it worked. You can find some free fonts on the net.

I'm using Java so I hope there is not some other problem with C# library.

...

Font font = Font.get(document, "c:\\Windows\\Fonts\\arial.ttf");
composer.setFont(font, 5);
composer.showText("\u03B2", new Point2D.Double(32,48));

...
fmelan
  • 127
  • 1
  • 5