Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Can't rasterize object with hole inside

$
0
0

Hello everyone.

I've used thisone part of script for rastering objects.

 

var docPathItems = app.activeDocument.pathItems;
var myDoc = app.activeDocument;
// If a docuement is open
if ( app.documents.length > 0 )
{  for ( var i=0; i < docPathItems.length ; i++ )  {  if (docPathItems[i].filled == true)  {  var rasterizeOptions = new RasterizeOptions;  rasterizeOptions.antiAliasingMethod = AntiAliasingMethod.ARTOPTIMIZED;  rasterizeOptions.backgroundBlack = false;  rasterizeOptions.clippingMask = true;  //rasterizeOptions.colorModel = RasterizationColorModel.GRAYSCALE;  rasterizeOptions.convertSpotColors = false;  rasterizeOptions.convertTextToOutlines = false;  rasterizeOptions.includeLayers = false;  rasterizeOptions.padding = 0;  rasterizeOptions.resolution = 300;  rasterizeOptions.transparency = true;  myDoc.rasterize(docPathItems[i], docPathItems[i].controlBounds,rasterizeOptions);  }  }
}

 

If object dont have hole inside (for example picture). It work ok.

Screenshot_2.png

BUT if its hole inside (for example picture) - I have error.

Screenshot_3.png

 

So.. error 

Screenshot_4.png

Screenshot_5.png

 

 

Who know what does it mean???


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>