5 Replies Latest reply on Jun 15, 2012 5:47 AM by 2i_Geert

    Export to server as JPEG images

    refuse2007

      Hi,

      does anyone knows how using Flash Builder, to get a "screenshot" of pages.

      something like get bitmapData or something of it.

      i just want make screenshots of every page and send them to my remote server.

      i cant found a way how to get a bitmap data of page.

       

      anyone has ideas?

       

      thanks

        • 1. Re: Export to server as JPEG images
          Harbs. Level 6

          You want a screenshot (including non-printing items) or a jpeg of the page content?

           

          Harbs

          • 2. Re: Export to server as JPEG images
            refuse2007 Level 1

            i want get a page content as jpg.

             

            like if we go to File -> export -> JPG -> unselect "spreads" checkbox. so we got jpg file for every page.

            so this images i need to send to server.

            • 3. Re: Export to server as JPEG images
              Marijan Tompa [tomaxxi] Level 4

              To export just single pages instead of spreads set exportingSpread in jpegExportPreferences to false.

               

              app.jpegExportPreferences.exportSpread = false;
              

               

              Hope that helps.

               

              --

              Marijan (tomaxxi)

              http://tomaxxi.com

              • 4. Re: Export to server as JPEG images
                refuse2007 Level 1

                its will be very helpful, if you can give me full code for it.

                 

                i am trying with this code but no success:

                 

                public static function run():void

                                    {

                                              var app:Application = InDesign.app;

                                              var document:Document = app.activeDocument;

                 

                                              var file:File = new File("C:/Users/admin/Desktop/5.jpg");

                                              if (file.exists){

                                                        var preset:PDFExportPreset = new PDFExportPreset();

                 

                                                        document.exportFile("jpg", file, false, preset);

                                              }

                                    }

                 

                 

                hope you can help me with

                • 5. Re: Export to server as JPEG images
                  2i_Geert

                  This should work (exports every page):

                   

                  var app:Application = InDesign.app;
                  var document:Document = app.activeDocument;
                  
                  if(document != null)
                  {
                      document.exportFile(ExportFormat.jpg, new File("C:\\Temp\\Export.jpg"));
                  }