Skip to main content
Known Participant
May 22, 2023
Question

how to get document raster effect details

  • May 22, 2023
  • 2 replies
  • 298 views

hi all,

how to retrieve the document raster effect details 

 these are the document raster effect details which i want to retrieve which is shown in the above screenshot.

if anyone know the solution to get this through c++ code in illustrator sdk using suites .
please kindly provide solution for this, if i get code to get this that will be more helpfull for me.

Thank you

This topic has been closed for replies.

2 replies

Participant
August 18, 2023

The document raster effects settings are stored in the document's dictionary, in another dictionary with the key string "AI Auto Rasterize". You can see its various entries by saving an Illustrator document without compression, opening it in a text editor, and searching for that string. You will see something like:


%_/Dictionary :
%_36 /Real (padd) ,
%_300 /Int (dpi.) ,
%_5 /Int (colr) ,
%_0 /Bool (mask) ,
%_1 /Bool (spot) ,
%_0 /Bool (alis) ,
%_; (AI Auto Rasterize) ,

 

 

 

So to get the resolution, say, you would use code as follows (error checking removed):

ai_long_t resolution = 72;
AIDictionaryRef docDict = NULL;
sAIDocument->GetDictionary( &docDict );
AIDictionaryRef rasterDict = NULL;
sAIDictionary->GetDictEntry( docDict, sAIDictionary->Key( "AI Auto Rasterize" ), &rasterDict );
sAIDictionary->GetIntegerEntry( rasterDict, sAIDictionary->Key( "dpi." ), &resolution );
sAIDictionary->Release( rasterDict );
sAIDictionary->Release( docDict );

 

Mahesh12Author
Known Participant
May 22, 2023

hi @CarlosCanto  is there any way to get document raster effect details through illustrator sdk suites using c++ ?