Load wmf image-java

by Mohan 2012-09-21 13:57:03

Load wmf image-java


import java.io.FileOutputStream;

import com.lowagie.text.Document;
import com.lowagie.text.Image;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;

public class MainClass {
public static void main(String[] args) throws Exception {
Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream("2.pdf"));
document.open();
document.add(new Paragraph("dog.wmf"));
Image img1 = Image.getInstance("dog.wmf");
System.out.println(img1.getClass().getName());
document.add(img1);


document.close();
}
}

Tagged in:

594
like
0
dislike
0
mail
flag

You must LOGIN to add comments