composer.setFillColor(
new DeviceRGBColor(115f/255,164f/255,232f/255)
);
// Set the font to use!
composer.setFont(
new StandardType1Font(
document,
StandardType1Font.FamilyEnum.Times,
true,
false
),
120
);
// Show the text!
composer.showText(
"PDFClown",
new Point2D.Double(
0,
templateSize.getHeight() - composer.getState().getFont().getAscent(composer.getState().getFontSize())
)
);
// Drawing the side rectangle...
composer.drawRectangle(
new Rectangle2D.Double(
templateSize.getWidth() - 50,
0,
50,
templateSize.getHeight()
)
);
composer.fill();
composer.end();
// Showing the side text inside the common content stream...
composer.beginLocalState();
composer.setFont(
new StandardType1Font(
document,
StandardType1Font.FamilyEnum.Helvetica,
false,
false
),