private void writeAttributes(final PdfTemplate template) { if (template != null) { this.setAttribute(PdfName.O, PdfName.LAYOUT); if (template.getWidth() > 0){ this.setAttribute(PdfName.WIDTH, new PdfNumber(template.getWidth())); } if (template.getHeight() > 0){ this.setAttribute(PdfName.HEIGHT, new PdfNumber(template.getHeight())); } PdfRectangle rect = new PdfRectangle(template.getBoundingBox()); this.setAttribute(PdfName.BBOX, rect); } }
private void writeAttributes(final PdfTemplate template) { if (template != null) { this.setAttribute(PdfName.O, PdfName.LAYOUT); if (template.getWidth() > 0){ this.setAttribute(PdfName.WIDTH, new PdfNumber(template.getWidth())); } if (template.getHeight() > 0){ this.setAttribute(PdfName.HEIGHT, new PdfNumber(template.getHeight())); } PdfRectangle rect = new PdfRectangle(template.getBoundingBox()); this.setAttribute(PdfName.BBOX, rect); } }
tp.addImage(image, image.getWidth(), 0, 0, image.getHeight(), 0, 0); haveIcon = true; boundingBoxWidth = tp.getBoundingBox().getWidth(); boundingBoxHeight = tp.getBoundingBox().getHeight(); tp.setBoundingBox(new Rectangle(template.getWidth(), template.getHeight())); writer.addDirectTemplateSimple(tp, PdfName.FRM); tp.addTemplate(template, template.getBoundingBox().getLeft(), template.getBoundingBox().getBottom()); haveIcon = true; boundingBoxWidth = tp.getBoundingBox().getWidth(); boundingBoxHeight = tp.getBoundingBox().getHeight();
tp.addImage(image, image.getWidth(), 0, 0, image.getHeight(), 0, 0); haveIcon = true; boundingBoxWidth = tp.getBoundingBox().getWidth(); boundingBoxHeight = tp.getBoundingBox().getHeight(); tp.setBoundingBox(new Rectangle(template.getWidth(), template.getHeight())); writer.addDirectTemplateSimple(tp, PdfName.FRM); tp.addTemplate(template, template.getBoundingBox().getLeft(), template.getBoundingBox().getBottom()); haveIcon = true; boundingBoxWidth = tp.getBoundingBox().getWidth(); boundingBoxHeight = tp.getBoundingBox().getHeight();
put(PdfName.SUBTYPE, PdfName.FORM); put(PdfName.RESOURCES, template.getResources()); put(PdfName.BBOX, new PdfRectangle(template.getBoundingBox())); put(PdfName.FORMTYPE, ONE); if (template.getLayer() != null)
put(PdfName.SUBTYPE, PdfName.FORM); put(PdfName.RESOURCES, template.getResources()); put(PdfName.BBOX, new PdfRectangle(template.getBoundingBox())); put(PdfName.FORMTYPE, ONE); if (template.getLayer() != null)