use of com.itextpdf.kernel.events.PdfDocumentEvent in project axelor-open-suite by axelor.
the class TableFooterEventHandler method handleEvent.
@SuppressWarnings("resource")
@Override
public void handleEvent(Event event) {
PdfDocumentEvent docEvent = (PdfDocumentEvent) event;
PdfDocument pdfDoc = docEvent.getDocument();
PdfPage page = docEvent.getPage();
PdfCanvas canvas = new PdfCanvas(page.newContentStreamBefore(), page.getResources(), pdfDoc);
Rectangle rect1 = new Rectangle(pdfDoc.getDefaultPageSize().getX() + doc.getLeftMargin(), pdfDoc.getDefaultPageSize().getBottom() - doc.getBottomMargin(), 100, 90);
new Canvas(canvas, pdfDoc, rect1).add(tableFooter);
}
Aggregations