How to embed PDF files into Flex App? Do I really need to transfer them to swf files first?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This was surprisingly more complicated than it should have been (considering they are both Adobe products).
You don’t need to convert the pdfs to swf files.
This page has practically all the details you need on how to do this http://livedocs.adobe.com/flex/3/html/help.html?content=PDF_1.html
You need to keep in mind that the client machine has to be PDF capable (i.e. have Adobe Reader installed). You will also need Acrobat Pro (or whatever they call it now) to do the more in-depth PDF scripting (javascript-in-pdf stuff).
To add to this (because I misread the question), to open a PDF file in Flex, you have two options. The first is, as you said, to convert the file to a swf or other format. The other is to open it using the user’s PDF reader. Calling
navigateToURL(new URLRequest('<http-link-to-pdf-file>' ) );should do it (assuming the user has a pdf reader installed).