Nother way to integrate PDF viewing in a Flex application

airapache-flex

I'm looking at ways to embed PDF viewing in a Flex application.

Currently the only option I've seen is by using the flash.html.HTMLLoader class, which only works if you're using AIR. This isn't a big deal — I'm willing to use AIR if I have to — but based on my experimentation with viewing a PDF this way it appears that AIR simply integrates the embedded Adobe PDF browser Plug-in for viewing, which not only shows the PDF page(s), but provides all of the manipulation controls as well (zooming, printing, etc.) which I don't want to see.

I'm looking for something that works somewhat along the lines of the JPedal library for Java — an embedded component that simply renders the PDF alone.
Has anyone found a way to do this with either AIR's built-in component or via some other method?

Best Answer

There are a couple of ways, but neither actually have the PDF in the Flex App:

  1. Convert the PDF to SWF. Use this tool or one like it to convert the file over.
  2. Use HTMLComponent, a method that uses an iframe over your flash/flex to make it appear like an external page is in your app. There are a few downsides to this method however - most of them described in detail at Deitte.com.
Related Topic