flex air show pdf preview -



I am using urlloader to load a TIFF file from the server. Then I take it as a byte and show the image in a popup window.

var bytes: bytere = urlloader.data as byte array; I use the TIFFbaselineDecoder to decode the byte and open the popup to show a bitmap. Works well.

Now, I want to do the same thing for a PDF file.

Please tell me.

thanks / wash

First of all, you can see that the user's machine PDF is suitable for display

  if (HTMLLoader.pdfCapability == HTMLPDFC ability STATUS_OK) {trace ("PDF content can be displayed"); } Else {trace ("PDF can not be displayed error code:", HTMLLoader.pdfCapability); }  

If so, then

  var request: URLRequest = new URLRequest ("http://www.example.com/test.pdf" ); PDF = new HTMLLoader (); Pdf.height = 800; Pdf.width = 600; Pdf.load (request); Container.addChild (PDF); Take care of yourself, it also works:  
  & lt; Mx: html width = "100%" height = "100%" location = "understanding _the_flex_3_lifecycle_v1" 0.pdf "/>  

Comments