i have question, but i have this peace of code

float scale = 50;

Image logo = Image.getInstance("imag.png");

logo.scalePercent(scale);

logo.setAbsolutePosition(0,0);

logo.setAlignment(Image.LEFT);

RtfShapePosition position = new RtfShapePosition(0, 0, 200, 200);

RtfShape shape = new RtfShape(RtfShape.SHAPE_RECTANGLE, position);

shape.setWrapping(RtfShape.SHAPE_WRAP_NONE);

shape.setProperty(new RtfShapeProperty(RtfShapeProperty.PROPERTY_IMAGE, logo));


// Add the shape to the document

document.add(shape);



and i wont wrap text around image but when I run application i get exceptions:



Exception in thread "main" java.lang.NullPointerException

at com.lowagie.text.rtf.graphic.RtfImage.writeContent(Unknown Source)

at com.lowagie.text.rtf.graphic.RtfShapeProperty.writeContent(Unknown Source)

at com.lowagie.text.rtf.graphic.RtfShape.writeContent(Unknown Source)

at com.lowagie.text.rtf.document.RtfDocument.add(Unknown Source)

at com.lowagie.text.rtf.RtfWriter2.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at ex.main(ex.java:75)



what is wrong ?



kr
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to