> -----Original Message-----
> From: Bendik R.Johansen [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, February 06, 2003 6:47
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] NullPointerException with FontFactory
> 
> Hello,
> Iget a NullPointerException  when i try to register � new font wit 
> FontFactory
> code:
> FontFactory.register("../fonts/edmunds.ttf");
> 
        And the stack trace is?

> The font is in that location, I am absolutely sure :)
> 
        No you are not, not with relative paths.

> What I am trying to achieve, is to write a specific piece of text, with 
> a certain font, at a fixed place on the page.
> code:
> Font font = FontFactory.getFont("Edmunds", BaseFont.WINANSI, 12);
> this.writeHandle.beginText();
> this.writeHandle.setFontAndSize(font.getBaseFont(), fontSize);
> this.writeHandle.showTextAligned(align, text, millimetersToPoints(x), 
> millimetersToPoints(y), 0);
> this.writeHandle.endText();
> 
> This works.. kind of. The pdf gets written, but the fonts look nothing 
> like they are supposed to (It's basically Helvetica squeezed together)
> 
        If the font is not found then Helvetica is returned. If it's
squeezed together that's because you have some transformation before.

        Best Regards,
        Paulo Soares

> Does anyone have any ideas?
> 
> Thanks
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to