Set Pdf Version 1

by Mohan 2012-09-21 13:55:44

Set Pdf Version 1


import java.io.FileOutputStream;

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

public class MainClass {

public static void main(String[] args) throws Exception {
Document.compress = false;
Document document = new Document(PageSize.A4);
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("1.pdf"));
writer.setPdfVersion('1');
document.open();
document.add(new Paragraph("Hello World"));
document.close();
}
}
419
like
0
dislike
0
mail
flag

You must LOGIN to add comments