PDF and appendToResponse
PDF and appendToResponse
- Subject: PDF and appendToResponse
- From: Gino Pacitti <email@hidden>
- Date: Tue, 27 Feb 2007 16:56:12 +0000
Hi All
I am using the PD4ML packages and can easily save PDF's to disk - but
i was wondering if anyone had used it a successfully was able to
display the PDF to browser?
I have this snippet:
try{
PD4ML html = new PD4ML();
StringReader sr = new StringReader(htmlAsData);
File f = new File(System.getProperties().getProperty
("pdfpath") +nameOfFile+".pdf");
java.io.FileOutputStream fos = new
java.io.FileOutputStream(f);
html.setPageSize(PD4Constants.A4);
html.setPageInsets(new Insets(10, 10, 10, 10));
html.setHtmlWidth(900);
html.enableImgSplit(false);
html.render(sr, fos);
} catch (Exception ex) {
ex.printStackTrace();
}
But how would I get the produced PDF to be seen immediately from the
returned Response?
Gino
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden