// step 3: we open the document
document.open();
// step 4: content
LwgImage gif = LwgImage.getInstance("vonnegut.gif");
gif.setAlignment(LwgImage.RIGHT | LwgImage.TEXTWRAP);
LwgImage jpeg = LwgImage.getInstance("otsoe.jpg");
jpeg.setAlignment(LwgImage.MIDDLE);
LwgImage png = LwgImage.getInstance("hitchcock.png");
png.setAlignment(LwgImage.LEFT | LwgImage.UNDERLYING);
for (int i = 0; i < 100; i++) {
document.add(new LwgPhrase("Who is this? "));
}
document.add(gif);