tags:

views:

249

answers:

3

Hi all!

I've written a PowerPoint-like application in Flash, and now our client would like to view the speaker notes (a PDF file) on a separate screen while using the application. What I would need is a separate application/html page which can show the PDF and programmatically change page when the master slide changes.

Is this possible?

If so, is it easiest to go with a html page + javascript or a Flex/AIR app?

It needs to be done without changing the PDF's, since there are 600+ files that need to be viewable.

A: 

There is no way to embed directly a PDF into a Flash application (there is no rendering engine in AS for that). The Flash/Flex application are using a trick for rendering PDF (a floating HTML frame which does the rendering using Acrobat plugin). So in your case the HTML/JS approach is the right one, no need for Flash.

I do not know if you can scroll the PDF using the internal JS api, but I suppose you can. It is possible to send events from the browser (read this link) so you will need to read the Acrobat SDK documentation in order to find how to scroll pages.

Cornel Creanga
Thanks! I tried the sample you linked to with one of my PDFs but it didn't show up. Do you know what could cause that?
Lizzan
Did you pressed on "Create PDF object" button?
Cornel Creanga
Yes, that's how I got the sample PDF to show. Even after clicking that using my own file, I got only a blank space where the PDF should be.
Lizzan
+1  A: 

You can embed PDF's in adobe AIR using the html renderer. I've never done it myself, but there are some good answers here: http://stackoverflow.com/questions/31077/how-do-i-display-a-pdf-in-adobe-flex.

quoo
Thanks, but most of those deal with converting the PDF to a Flash with the same content. While I could script the whole conversion process, it would still leave me with twice as many files to distribute, and some of those PDF's are large. To save on distribution and installation space I'd rather work directly with the actual PDF's.
Lizzan
I'm accepting this answer as it is the best for how the question was posed. In reality, the Flash app is embedded in another app (AutoPlay Media Studio 8), and I went with its built-in capability of showing PDF's.
Lizzan
Ah.. sorry for the late response. AIR's webkit rendering engine should be able to render the PDF's (without converting it to a swf), provided the user has acrobat installed on their machine: http://livedocs.adobe.com/flex/3/html/help.html?content=PDF_1.html
quoo