getInputPath() + java.io.File.separator + "fonts" + java.io.File.separator + "lazyDog.ttf"
);
// Showing the page title...
// Define the box frame to force the page title within!
Rectangle2D frame = new Rectangle2D.Double(
20,
150,
pageSize.getWidth() - 90,
pageSize.getHeight() - 250
);
// Begin the block!
blockComposer.begin(frame,AlignmentXEnum.Center,AlignmentYEnum.Top);
// Set the font to use!
composer.setFont(font,56);
// Set the text rendering mode (outline only)!
composer.setTextRenderMode(TextRenderModeEnum.Stroke);
// Show the page title!
blockComposer.showText("Welcome");
// End the block!
blockComposer.end();
// Showing the clown photo...
// Instantiate a jpeg image object!
Image image = Image.get(getInputPath() + java.io.File.separator + "images" + java.io.File.separator + "Clown.jpg"); // Abstract image (entity).
Point2D imageLocation = new Point2D.Double(
blockComposer.getBoundBox().getX() + blockComposer.getBoundBox().getWidth() - image.getWidth(),
blockComposer.getBoundBox().getY() + blockComposer.getBoundBox().getHeight() + 25
);
// Show the image!
composer.showXObject(
image.toXObject(document),
imageLocation,
new Dimension(0,0)
);
Rectangle2D descriptionFrame = new Rectangle2D.Double(
imageLocation.getX(),
imageLocation.getY() + image.getHeight() + 5,
image.getWidth(),
20
);