Until iTextSharp is in sync with iText, I am using iText with IKVM to get the
dll's I need.
I just have a couple questions that should be straight forward. I need to
know what to change in the following code (where commented out) to get the
pdf to stream to a browser.
//in iTextSharp, this line would be a MemoryStream
//java.io.OutputStream newpdf; //new
FileOutputStream("c:\\temp\\test.pdf");
com.lowagie.text.pdf.PdfReader pdfReader = new
com.lowagie.text.pdf.PdfReader("http://ServerURL/Oldpdf.pdf");
com.lowagie.text.pdf.PdfStamper pdfStamper = new
com.lowagie.text.pdf.PdfStamper(pdfReader, newpdf);
com.lowagie.text.pdf.AcroFields pdfFormFields =
pdfStamper.getAcroFields();// AcroFields;
pdfFormFields.setField("NAME_FIRST", "Test");
pdfStamper.setFormFlattening(true);
pdfStamper.close();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition",
"attachment;filename=nameofpdf.pdf");
Response.Buffer = true;
Response.Clear();
//There is no such method as GetBuffer in the java.io.OutputStream
object
//Response.OutputStream.Write(newpdf.GetBuffer(), 0,
newpdf.GetBuffer().Length);
Response.OutputStream.Flush();
Response.End();
Thanks for any help you can provide.
Chad
--
View this message in context:
http://www.nabble.com/iText-IKVM-C--stream-to-browser-issues-tp22483298p22483298.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php