String text = "Some text to show";
document.add(new Paragraph(text, new LwgFont(LwgFont.HELVETICA, 24, LwgFont.NORMAL, new SpotColor(spc_cmyk, 0.25f))));
document.add(new Paragraph(text, new LwgFont(LwgFont.HELVETICA, 24, LwgFont.NORMAL, new SpotColor(spc_cmyk, 0.5f))));
// example with template
PdfTemplate t = cb.createTemplate(500f, 500f);
// Stroke a rectangle with CMYK alternate
t.setColorStroke(new SpotColor(spc_cmyk, .5f));
t.setLineWidth(10f);
// draw a rectangle
t.rectangle(100, 10, 100, 100);
// add the diagonal
t.moveTo(100, 10);
t.lineTo(200, 100);
// stroke the lines
t.stroke();
// Fill a rectangle with CMYK alternate
t.setColorFill(spc_g, 0.5f);
t.rectangle(100, 125, 100, 100);
t.fill();
t.beginText();
t.setFontAndSize(bf, 20f);
t.setTextMatrix(1f, 0f, 0f, 1f, 10f, 10f);
t.showText("Template text upside down");
t.endText();
t.rectangle(0, 0, 499, 499);
t.stroke();
t.sanityCheck();
cb.addTemplate(t, -1.0f, 0.00f, 0.00f, -1.0f, 550f, 550f);
cb.sanityCheck();
}
catch(Exception de) {