IDocument.WRITER, new DocumentDescriptor());
ITextDocument textDocument = (ITextDocument) document;
boolean useStream = true;
GraphicInfo graphicInfo = null;
String imagePath = "d:\\my_image.gif";
int pixelWidth = 265;
int pixelHeight = 256;
if(!useStream) {
//with url
graphicInfo = new GraphicInfo(imagePath, pixelWidth, true, pixelHeight, true,
VertOrientation.TOP, HoriOrientation.LEFT,
TextContentAnchorType.AT_PARAGRAPH);
}
else {
//with stream
graphicInfo = new GraphicInfo(new FileInputStream(imagePath), pixelWidth,
true, pixelHeight, true, VertOrientation.TOP, HoriOrientation.LEFT,
TextContentAnchorType.AT_PARAGRAPH);
}
ITextContentService textContentService = textDocument.getTextService()