Title: RE: [iText-questions] Help required in streaming effect in PDF
Hi Ravi,
Thanks for the link.
In my case i select some input criteria from the client page and click on a button to generate a PDF report.The request is directed to a servlet which fires a querry to the database.I then collect the results and display in a PDF format.The problem i am facing here is the output data is large and it takes a long time to display the PDF.
 
This is how i create a document object and populate it ,Could u please explain me how partial response will help here since i will have to make new instances of the document object everytime .Creating new instances of document object will open new PDF files.
 
import java.io.OutputStream;
import com.lowagie.text.Document;
import com.lowagie.text.pdf.PdfWriter;
 
private Document doc;
private OutputStream oStream;
private PdfWriter writer;
 
// CREATE PDF DOCUMENT AND BIND TO "O STREAM"
try {
doc = new Document( PageSize.A4, -38, -38, 30, 10 );
writer = PdfWriter.getInstance( doc, oStream );
 
// EXECUTE THE QUERRY
 
// Collect the results and then put it in the document object
 
// Close the document object and then flush it out.
 
Regards,
Ben
 
 
 

 -----Original Message-----
From: Ravi [mailto:[EMAIL PROTECTED]
Sent: Friday, January 09, 2004 10:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [iText-questions] Help required in streaming effect in PDF

Hi Ben,
 
Are you talking about byte serving of the PDF? I am not sure about linearization etc. However I think it is possible to Byte Serve a PDF from a java servlet.
 
Here is a link to about the difference between Linearization and Byte Serving.
 
 
In your case I assume that 'streaming' means 'byte serving'. If you want to try byte serving, try modifying ur servlet to handle partial response.. and the request has to be for partial content too.
 
Thanks,
Ravi
 
----- Original Message -----
Sent: Friday, January 09, 2004 3:20 AM
Subject: RE: [iText-questions] Help required in streaming effect in PDF

It can't be done with the pdf format. Even linearization (that iText doesn't support) requires all the document to be available before starting. Pdf can't be streamed.

Best Regards,

Paulo Soares

    -----Original Message-----

    From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Abraham, Ben

    Sent:   Friday, January 09, 2004 6:02

    To:     [EMAIL PROTECTED]

    Subject:        [iText-questions] Help required in streaming effect in PDF

    Hi,

    Can someone explain me how to do a streaming effect while generating PDF.

    I am generating a PDF which is around 500 pages and this PDF won't come come up till it gets all the required data.So the user has to wait around 10 minutes to see the PDF.Can someone please suggest me a better method.

     

    Thanks,

    Ben


    ____________________________________________

    Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender immediately and destroy the original message and all copies.


____________________________________________

Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender immediately and destroy the original message and all copies.

Reply via email to