itext-questions  

Re: [iText-questions] Can iText notify a browser when the pdf is done loading?

wasegraves
Wed, 14 May 2008 19:48:13 -0700

-------------- Original message ----------------------
From: ambassador <[EMAIL PROTECTED]>
>
> 
> I am streaming a dynamic iText pdf to a web browser.  Is there something I
> can put in the pdf that will notify the browser when the pdf is done
> downloading?

Other than the EOF marker that the PDF should have, the answer is no. Your 
question is not an iText question, as it would be the same, regardless of the 
scripting language or library that is used on the server side to generate the 
PDF.

That said (written), you *could* put a page action on the last page of the PDF 
that you generate with iText, which action would launch a JavaScript on the 
PAGE_OPEN event of the last page. See Chapter 13 in the book for examples.

> I know pdf's use javascript, but I'm not sure pdf javascript
> can communicate with browser javascript.  My browser needs to know when the
> pdf is done loading so it can perform other actions.

Please see the documentation for classes PdfAction/PdfWriter for the 
methods/events that are available to you.

Best regards,
Bill Segraves


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar