For information I find a workaround to export art as png, using 'ai_plugin_rasterize' and 'adobe_exportDocument' commands.
First of all, art is rasterized using 'ai_plugin_rasterize' command.
I used action scripts, as you told me, to 'hack' adobe' command. Command is used as follow:
ASErr result1;
AIActionParamValueRef valueParameterBlock1 = NULL;
ActionDialogStatus dialogStatus1 = kDialogOff;
result1 = sAIActionManager->AINewActionParamValue(&valueParameterBlock1);
if (valueParameterBlock1)
{
result1 = sAIActionManager->AIActionSetString(valueParameterBlock1, 1668246642, "CMJN");
result1 = sAIActionManager->AIActionSetString(valueParameterBlock1, 1685088558, "72");
result1 = sAIActionManager->AIActionSetString(valueParameterBlock1, 1651205988, "1");
result1 = sAIActionManager->AIActionSetString(valueParameterBlock1, 1954115685, "0");
result1 = sAIActionManager->AIActionSetString(valueParameterBlock1, 1634494763, "1");
result1 = sAIActionManager->AIActionSetString(valueParameterBlock1, 1835103083, "0");
result1 = sAIActionManager->AIActionSetString(valueParameterBlock1, 1885430884, "0.0");
result1 = sAIActionManager->PlayActionEvent("ai_plugin_rasterize", dialogStatus1, valueParameterBlock1);
result1 = sAIActionManager->AIDeleteActionParamValue(valueParameterBlock1);
}
This is hardcore and awful coding! 😉 all keys are cuted and pasted directly from action script I have made, and values iare directly written in that method.
Parameter 1 : Color Model. (enumerated)
Parameter 2 : Resolution. (integer)
Parameter 3 : Background (enumerated)
Parameter 4 : (enumerated)
Parameter 5 : Do not know the correct translation in English, "Lissage" mode in french in the text. (enumerated)
Parameter 6: Create a mask (boolean)
Parameter 7 : add point around art.(unit real)
Then adobe_exportDocument is called.
As it shown above, command is called like that:
ASErr result;
AIActionParamValueRef valueParameterBlock = NULL;
ActionDialogStatus dialogStatus = kDialogOff;
result = AIActionManager->AINewActionParamValue(&valueParameterBlock);
if (valueParameterBlock)
{
result = sAIActionManager->AIActionSetString(valueParameterBlock, 'name', pathName);
result = sAIActionManager->AIActionSetString(valueParameterBlock, 'frmt', "Adobe PNG Format");
result = sAIActionManager->AIActionSetString(valueParameterBlock, 'extn', "png");
result = sAIActionManager->PlayActionEvent("adobe_exportDocument", dialogStatus, valueParameterBlock);
result = sAIActionManager->AIDeleteActionParamValue(valueParameterBlock);
}