I have more or less the same problem, but I have to show the file PDF/EPUB. AlivePDF (or purePDF) is used to write a file and not to show a file. Is there a solution in AIR to show these types of file?
Yes, the solution I have seen is to rely on the web engine embedded in AIR and use HTML to display an embedded PDF (i.e a PDF embedded in an HTML page): http://livedocs.adobe.com/flex/3/html/help.html?content=PDF_1.html
Thanks for your answer, but is possible to embed the pdf without using the Adobe Reader browser plug-in?
We don't have APIs like Quartz on the iPhone that allows to display a PDF straightforwardly.
But you can still load the PDF into a byte array, parse the PDF content (knowing the PDF file format) and render it on the screen.
this code doesn't works.
My app is an Air Mobile App
var f:File = new File(fileStoredInDevice.absolutePath);
var localBytes:ByteArray = new ByteArray();
var fs:FileStream = new FileStream();
fs.readBytes(localBytes, 0, fileStoredInDevice.bytesAvailable);
var l:FlexLoader = new FlexLoader();
(holder is a SpriteVisualElement).
Runtime Error: Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.