[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2007-10-15
5
Medium Priority
?
3,404 Views
Last Modified: 2008-05-28
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.
0
Comment
Question by:ecomaster
  • 3
5 Comments
 
LVL 16

Accepted Solution

by:
vickerleung earned 2000 total points
ID: 20083765
Hi Wim,

I don't think Flex can keep track of your PDF creation process. (I mean having a progress bar with percentage complete) It can only track PDF loading (download) progress, however Flex itself can not show PDF document, so track loading is useless in that case.

Flex itself can talk with the HTML container using JavaScript and External API. So it is possible that Flex call HTML with variable passing. However based on the point that Flex completely loaded a PDF not equals to the HTML can use that cached PDF, so I don't think this approach is possible. (Flex and Browser's data cache position might be different).

Though... I don't think loading PDF inside Flex will be far away from now. They are all Adobe's product.

Cheers
Vicker
0
 
LVL 2

Expert Comment

by:ll_jaxn
ID: 20109222
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.
0
 
LVL 16

Expert Comment

by:vickerleung
ID: 20109272
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
0
 
LVL 16

Assisted Solution

by:vickerleung
vickerleung earned 2000 total points
ID: 20109279
Hi Wim,

Missing URL:
http://www.alivepdf.org/

Cheers
Vicker
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 20258088
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.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Suggested Courses
Course of the Month17 days, 21 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question