Jump to content
Search Community
ondras82 test
Moderator Tag

Recommended Posts

I need load PDF file and show as bitmap in Flash (AS3).
I found this code in documentation, but I don´t know how transform byteArray to bitmap?

Can somebody help me please?

var loader:BinaryDataLoader = new BinaryDataLoader("files/dum.pdf",{name:"filePDF",requireWithRoot:this.root,estimatedBytes:6800});
var files:Array = ["files/dum.pdf"];
LoaderMax.registerFileType("pdf", BinaryDataLoader);
var queue:LoaderMax = LoaderMax.parse(files,{onProgress:progressHandler,onComplete:completeHandler,onChildFail:childFailHandler});
function completeHandler(event:LoaderEvent):void
var byteArray:ByteArray = LoaderMax.getContent("filePDF");
//  I need bitmap from the PDF file ???


Link to comment
Share on other sites

  • 9 months later...
  • 3 weeks later...

Hey mate,


Directly loading a PDF is not possible in Flash for a multitude of reasons. There are some other options however if you only working with Flash.





Converts a PDF document to SWF pages which you can use in oyur app. Havn't tried this one personally but you might get some milage out of it.


If however you are using Adobe AIR, you can load your PDF into a HTML Container and then assuming the system that is running your app has adobe reader installed. It should render the PDF.

var request:URLRequest = new URLRequest("mydoc.pdf");
pdf = new HTMLLoader();
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...