"%PDF-1.4 %���� 2 0 obj <> stream [EMAIL PROTECTED])�� ... "
import java.io.IOException;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import javax.servlet.http.*;
import com.lowagie.text.pdf.PdfWriter;
public void doGet (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
String string1 = ", text here text here text here.";
Paragraph para6 = new Paragraph("Date (Attach Death Certificate)");
Paragraph para7 = new Paragraph("");
Paragraph para9 = new Paragraph("text.");
Paragraph para10 = new Paragraph("Applicant's signature_");
Paragraph para11 = new Paragraph("Notary's Certification");
Paragraph para12 = new Paragraph("State of");
Paragraph para13 = new Paragraph("I certify that");
para7.setIndentationLeft(50);
para6.setLeading(10);
Document document = new Document();
response.setContentType("application/pdf");
response.setHeader("Expires", "0");
response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");
response.setHeader("Pragma", "public");
//PdfWriter.getInstance(document, new FileOutputStream("c:\\temp\\PANotMarriedStatement.pdf"));
document.open();
document.add(new Paragraph("\n"));
document.add(para6);
document.add(new Paragraph("\n"));
document.add(para7);
document.add(new Paragraph("\n"));
document.add(para9);
document.add(new Paragraph("\n"));
document.add(para10);
document.add(new Paragraph("\n"));
document.add(para11);
document.add(new Paragraph("\n"));
document.add(para12);
document.add(new Paragraph("\n"));
document.add(para13);
response.setContentLength(baos.size());
response.setBufferSize(baos.size());
ServletOutputStream out = response.getOutputStream();
baos.writeTo(out);
out.flush();
}
catch(DocumentException de) {
de.printStackTrace();
System.err.println(de.getMessage());
}
catch(IOException ioe) {
ioe.printStackTrace();
System.err.println(ioe.getMessage());
}
}
It's new, it's here! It's full of fun! MSN Messenger V6.0 ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
