Java 类com.lowagie.text.pdf.codec.wmf.MetaDo 实例源码

项目:itext2    文件:ImgWMF.java   
/** 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();
        }
    }
}
项目:DroidText    文件:ImgWMF.java   
/** 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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteArchive    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:MesquiteCore    文件:ImgWMF.java   
/** 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(width());
    template.setHeight(height());
    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();
        }
    }
}
项目:itext2    文件:RtfImage.java   
/**
 * Extracts the image data from the Image.
 * 
 * @param image The image for which to extract the content
 * @return The raw image data, not formated
 * @throws DocumentException If an error occurs accessing the image content
 */
private byte[][] getImageData(Image image) throws DocumentException 
{
    final int WMF_PLACEABLE_HEADER_SIZE = 22;
    final RtfByteArrayBuffer bab = new RtfByteArrayBuffer();

    try {
        if(imageType == Image.ORIGINAL_BMP) {
            bab.append(MetaDo.wrapBMP(image));
        } else {                
            final byte[] iod = image.getOriginalData();
            if(iod == null) {

                final InputStream imageIn = image.getUrl().openStream();
                if(imageType == Image.ORIGINAL_WMF) { //remove the placeable header first
                    for(int k = 0; k < WMF_PLACEABLE_HEADER_SIZE; k++) {
            if(imageIn.read() < 0) throw new EOFException("while removing wmf placeable header");
        }
                }
                bab.write(imageIn);
                imageIn.close();

            } else {

                if(imageType == Image.ORIGINAL_WMF) {
                    //remove the placeable header                       
                    bab.write(iod, WMF_PLACEABLE_HEADER_SIZE, iod.length - WMF_PLACEABLE_HEADER_SIZE);
                } else {
                    bab.append(iod);
                }

            }
        }

        return bab.toByteArrayArray();

    } catch(IOException ioe) {
        throw new DocumentException(ioe.getMessage());
    }
}