示例#1
0
 /**
  * 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();
     }
   }
 }