5 Replies Latest reply on Mar 15, 2012 4:42 PM by jeffmlevy

    Minor "Derp", after placing image in Image, Object is no longer valid

    jeffmlevy

      Or,

       

      "How I stopped worrying and learnd to love India Pale Ale".

       

      I'm having some problems. I think they're pretty basic.

       

      for(var i=0, i<myDoc.pageItems.length;i++)

      {

           // document.pageItems[0] is an Image

           myDoc.pageItems[i].place(File("/foo/bar/baz/MyColoRectalScanInLivingColor.jpg")); //! huzzah, it works.

           myDoc.pageItems[i].fit(FitOptions.FILL_PROPORTIONALLY); // FAIL! Oh NO!

      }

       

      fails with,  "Object is invalidEngine". Why is my object invalid, and, how do I make it valid so I can do some groovy-neat stuff with it, like, fit(), transform() etc etc?

       

      thanks!