Link to home
Start Free TrialLog in
Avatar of ecomaster
ecomaster

asked on

Flex 2, display URLLoader result data (PDF document) in html page

Hi,

I'm working on an existing PHP application, where on of the features involves generating PDF documents from various data in the (MySQL) DB, by calling a php page, that outputs the generated PDF document. Depending on the amount of data, this can take a long time.
So I thought about using a small Flex application to load the pdf document (URLlLoader), and retrieve the progress of the PDF generation until the page is loaded. Afterwards the document must be displayed to the user, preferably in the html page containing the Flex swf. Is there a way to pass the result data to the containing html page? If not, can it be displayed in the flex application itself?

Regards,
Wim.
ASKER CERTIFIED SOLUTION
Avatar of Vicker Leung
Vicker Leung
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ll_jaxn
ll_jaxn

To make this work anyway, you have to have the adobe applet to view the pdf, so maybe Flex can set a variable like a symophor, that a javascript timerpop is waiting for and either the javascript or FLEX can set the content/src value of the applet to the newly downloaded element holding the PDF.
Hi Wim,

Recently come across with AlivePDF in Google Code - a actionscript library to generate pdf in Flash / Flex applications. You might be interested in it.

I will try to browse it to see if there is a way for this library to keep track the building progress.

Cheers
Vicker
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As the PHP application which generates the PDF is in place, what I can suggest is to use a java script "loading" display which will be lighter when compared to flash (flex2) loading. Using flex 2 is not that simple in this case as we clearly don't know how long it may take to construct the PDF.