PdfTemplate t = writer.getDirectContent().createTemplate(850, 600); t.rectangle(x+20,y+20, width-40, height-40); t.clip(); t.newPath(); t.addImage(img, width, 0, 0, height, x, y);
PdfTemplate t = writer.getDirectContent().createTemplate(850, 600); t.rectangle(x+20,y+20, width-40, height-40); t.clip(); t.newPath(); t.addImage(img, width, 0, 0, height, x, y);