Script de exemplo
import com.lowagie.text.pdf.*;
import com.lowagie.text.Image;
import java.awt.Color;
pdf = ctx.getEvent().getObject();
boleto = pdf.getBoleto();
tituloId = boleto.getId();
fonte = BaseFont.createFont(BaseFont.HELVETICA_BOLD, BaseFont.WINANSI, BaseFont.EMBEDDED);
pdf.addImage(33, 600, Image.getInstance("file:///tmp/logo.png"), 200, 500);
pdf.addLine(2, 451, 593, 839);
pdf.addText(5, 830, fonte, 5, "Fonte 5 na posição 5,830");
pdf.addText(200, 800, fonte, 8, "Fonte 8 na posição 200,800");
pdf.setColor(new Color(128,0,0));
pdf.addText(150, 500, fonte, 12, "Fonte 12 em 150,500");
pdf.addText(530, 451, fonte, 5, "Fonte 5 em 500,451");
pdf.setColor(Color.BLACK);
pdf.addText(33, 753, fonte, 5, "Beneficiário");
pdf.addText(33, 743, fonte, 7, boleto.getCedente().length()>42 ? boleto.getCedente().substring(0, 42) : boleto.getCedente());
pdf.addText(300, 296, fonte, 11, boleto.getNomeSacado());
pdf.addHorizontalLine(450, 10, 580);
pdf.addVerticalLine(580, 450, 800);