2 Replies Latest reply on Oct 7, 2009 3:42 PM by epi3rc3

    AIR: Pdf Preview

    epi3rc3

      im working on a app that saves a pdf then uses air to open a preview window of the pdf inside my air app. this works fine on my computer(mac) and used to work on my 2nd computer (pc) but has since stopped and on a clients computer(pc) it also does not work. what happens when it doesnt work is just a white window popsup instead of the pdf preview. all of the computers have adobe reader 9.1+ installed and the pdf files DO get generated.

       

      heres some code:

       

                  var stream:FileStream = new FileStream();
                  var file:File = File.desktopDirectory.resolvePath("pdf/note.pdf");
                  stream.open(file, FileMode.WRITE);
                  var bytes:ByteArray = printPDF.save(Method.LOCAL);
                  stream.writeBytes(bytes);
                  stream.close();

       

                 
                  aPreview = PopUpManager.createPopUp(this, CPDFPreview, false);

       

                    CPDFPreview(aPreview).width = 1025;
                    CPDFPreview(aPreview).height = 550;
                  CPDFPreview(aPreview).loadFile( file );

       

      any reason why this would make just a white window popup? im using alivepdf to create the pdf