• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Error when invoking RasterizeDocument( )

Community Beginner ,
Jan 21, 2021 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

71

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Adobe