views:

34

answers:

1

I have pre-existing PDF files which I would like to send to a PrintJob in Flex 3. I can load the files fine with UrlRequest, but I need to somehow get the data into a Sprite to be included into a PrintJob.

Is there a way to do this, or should I go another route? (I've seen the hidden iFrame example, but I was hoping for a way to do this without JavaScript.)

Thanks

+1  A: 

If you're using Aodbe AIR, then you'll be able to load the PDF into an HTML View.

Flex (and The Flash Player) does not have any native support for displaying (or creatging) PDFs, though.

Most people will just pass the generated PDF to the browser and let it handle it. You can do this w/ navigateToURL. The iFrame trick can work, although the actual display of the PDF may depend upon browser settings.

Here is another StackOverflow Post on a similar topic. It links to this site http://www.devaldi.com/?p=212 which provides one alternative.

www.Flextras.com
Thanks but I was hoping to pass multiple files to the print job, so navigateToUrl multiple times can seem tedious. The FlexPaper seems to only accept pdf's that have been converted to swf.
adamcodes
Most people do not do what you're trying to do. If you want to aggregate multiple PDFs; send them to the server and give your client a single PDF. Do not try to handle the printing of said PDFS in Flex. That isn't what it was designed for.
www.Flextras.com