private void addPageSizeEnforcer(PdfWriter writer) {
if (marginEnforcerImage == null) {
marginEnforcerImage = createEnforcerImage();
}
PdfContentByte cb = writer.getDirectContent();
Rectangle pageSize = writer.getPageSize();
try {
float sz = 2.5f;
float dx = pageSize.getWidth() - sz;
float dy = pageSize.getHeight() - sz;
cb.addImage(marginEnforcerImage, sz, 0, 0, sz, 0, dy);
cb.addImage(marginEnforcerImage, 0, sz, -sz, 0, sz, 0);
cb.addImage(marginEnforcerImage, -sz, 0, 0, -sz, dx + sz, sz);
cb.addImage(marginEnforcerImage, 0, -sz, sz, 0, dx, dy + sz);
} catch (DocumentException ex) {