Please see the tutorial.

http://itextdocs.lowagie.com/tutorial/general/webapp/

-Bill Ensley
Bear Printing

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Diana K.
Woodhouse
Sent: Wednesday, December 14, 2005 1:36 PM
To: Diana K. Woodhouse; [email protected]
Subject: Re: [iText-questions] How do I stream output to browser instead of
a file

Just to clarify, I want to stream directly into the browser plugin for the
PDF reader, not create html.

Thanks,
Diana

--- "Diana K. Woodhouse" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I've got this chunk of code that uses PdfWriter to stream output to a 
> file.  The information is fairly sensitive and I would rather stream 
> directly to the browser.  Can someone help me to modify my code to 
> send output directly to the browser?  Thanks very much!
> 
> 
> reader = new PdfReader(infilename);
>       
> pager = reader.getPageSize(1);
> 
> // step 1: creation of a document-object document = new 
> Document(pager, 50, 50, 50, 50);
> 
> // step 2: we create a writer that listens to the document writer = 
> PdfWriter.getInstance(document, new FileOutputStream(outfilename));
>       
> // step 3: we open the document
> document.open();
>       
> // step 4: we add content
> cb = writer.getDirectContent();
> document.newPage();
> pagew = writer.getImportedPage(reader, 1);
> 
> cb.addTemplate(pagew, 0, 0);
> // we tell the ContentByte we're ready to draw text cb.beginText();
>         
>  
> 
> Thanks,
> Diana
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
> 
> 
>
-------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
> files for problems?  Stop!  Download the new AJAX search engine that 
> makes searching your log files as easy as surfing the web.  DOWNLOAD 
> SPLUNK!
>
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> iText-questions mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to