Error when invoking RasterizeDocument( )

Community Beginner ,
Jan 21, 2021

Copy link to clipboard

Copied

Hi, I am trying to rasterize an artboard but continue to get an error kBadParameterErr. The code I am using is this, I do not quite get what is the problem. 

 

  AIArtHandle raster;
  AIRasterizeSettings rastSettings;
  rastSettings.type = kRasterizeRGB;
  rastSettings.antialiasing = 2;
  rastSettings.options = kRasterizeOptionsNone;
  rastSettings.ccoptions = AIColorConvertOptions::kForExport;
  rastSettings.resolution = 72;  //here I  set the resolution of raster

  //Get the first art of layer
  AILayerHandle layer = NULL;
  AIArtHandle firstArt;
  auto error = s_layer->GetFirstLayer(&layer);
  error = s_art->GetFirstArtOfLayer(layer, &firstArt);

  // Rasterize the document
  error = s_raster->RasterizeDocument(&rastSettings, kPlaceDefault, firstArt, &raster, Progress, kRasterizeOptionsNone);
  // ===========================
  // == HERE error is always kBadParameter

 

I am trying to wrap my head around the illustrator SDK but I do not understand how to debug the issue. Is there some better error reporting that I can get somewhere?  

 

TOPICS
SDK

Views

17

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Have something to add?

Join the conversation