All pastes #1416447 Raw Edit

PdfWriter

public java v1 · immutable
#1416447 ·published 2009-05-08 14:29 UTC
rendered paste body
package in_action.chapter01;import java.io.FileOutputStream;import java.io.IOException;import com.lowagie.text.*;import com.lowagie.text.pdf.PdfWriter;import javax.swing.JOptionPane;public class HelloWorld {	public static void main(String[] args) {				Document document = new Document();		try {String URL=JOptionPane.showInputDialog("Enter URL Of The File OutPut :");						PdfWriter.getInstance(document,new FileOutputStream(URL));						document.open();			            String swer=JOptionPane.showInputDialog("Enter Your Text :");			document.add(new Paragraph(swer));		} catch (DocumentException de) {			System.err.println(de.getMessage());		} catch (IOException ioe) {			System.err.println(ioe.getMessage());		}				document.close();	}}