tp.setWidth(w); tp.setHeight(h);
static PdfTemplate createTemplate(PdfWriter writer, float width, float height, PdfName forcedName) { PdfTemplate template = new PdfTemplate(writer); template.setWidth(width); template.setHeight(height); writer.addDirectTemplateSimple(template, forcedName); return template; }
static PdfTemplate createTemplate(PdfWriter writer, float width, float height, PdfName forcedName) { PdfTemplate template = new PdfTemplate(writer); template.setWidth(width); template.setHeight(height); writer.addDirectTemplateSimple(template, forcedName); return template; }
PdfTemplate createTemplate(final float width, final float height, final PdfName forcedName) { checkWriter(); PdfTemplate template = new PdfTemplate(writer); template.setWidth(width); template.setHeight(height); writer.addDirectTemplateSimple(template, forcedName); return template; }
/** Reads the WMF into a template. * @param template the template to read to * @throws IOException on error * @throws DocumentException on error */ public void readWMF(PdfTemplate template) throws IOException, DocumentException { setTemplateData(template); template.setWidth(getWidth()); template.setHeight(getHeight()); InputStream is = null; try { if (rawData == null){ is = url.openStream(); } else{ is = new java.io.ByteArrayInputStream(rawData); } MetaDo meta = new MetaDo(is, template); meta.readAll(); } finally { if (is != null) { is.close(); } } } }
PdfTemplate createTemplate(final float width, final float height, final PdfName forcedName) { checkWriter(); PdfTemplate template = new PdfTemplate(writer); template.setWidth(width); template.setHeight(height); writer.addDirectTemplateSimple(template, forcedName); return template; }
/** Reads the WMF into a template. * @param template the template to read to * @throws IOException on error * @throws DocumentException on error */ public void readWMF(PdfTemplate template) throws IOException, DocumentException { setTemplateData(template); template.setWidth(getWidth()); template.setHeight(getHeight()); InputStream is = null; try { if (rawData == null){ is = url.openStream(); } else{ is = new java.io.ByteArrayInputStream(rawData); } MetaDo meta = new MetaDo(is, template); meta.readAll(); } finally { if (is != null) { is.close(); } } } }
if (scale > 0) g2.scale(scale, scale); tp.setWidth(w); tp.setHeight(h); canvas.paintComponent(g2);