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

Hi how to solve this problem?

New Here ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

Hi,Im developing a plug in which should remove the extra spaces between and at the end of the text.

error = sAITextRun->SetTextRunByteCount(line,strlen((char*)buffer));

if(error)

{

MessageBox(NULL, "Error->SetTextRunByteCount", "LW TOOL", 0);

return error;

}

error = sAITextRun->SetTextRunByteCodes (line,0,strlen((char*)buffer),(unsigned char *)buffer);
if(error)
{

MessageBox(NULL, "Error->SetTextRunByteCodes", "LW TOOL", 0);

return error;

}

if(ccount1 >1 && buffer[ccount1-2] == ' ')


{

trim((char*)buffer);

sprintf(buf,"%d",strlen((char*)buffer));

MessageBox(NULL,buf,"trim",0);

error = sAITextRun->SetTextRunByteCount(prevline,strlen((char*)buffer)+1);

if(error)

{

MessageBox(NULL, "Error->SetTextRunByteCount", "LW TOOL", 0);

return error;

}

error = sAITextRun->SetTextRunByteCodes (prevline,0,strlen((char*)buffer),(unsigned char *)buffer);

if(error)

{

MessageBox(NULL, "Error->SetTextRunByteCodes", "LW TOOL", 0);

return error;

}


error = sAITextRun->GetTextRunByteCount (prevline,&ccount1 );

error = sAITextRun->GetTextRunByteCodes (prevline,0,ccount1,(unsigned char *)buffer );

}

While im using this code,while running in batch process it gets hanged.
Please tell me a solution.
Im using illustrator 10,VC++.
TOPICS
SDK

Views

484

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
Adobe
Guide ,
Jul 15, 2008 Jul 15, 2008

Copy link to clipboard

Copied

LATEST
It's been a loooong time since I worked in AI10 -- the text engine is completely different in CS and later -- but my first instinct is to ask "Why are you using Text*Byte*() calls?" Admittedly, it's been a while, but I don't remember ever using anything as 'low level' as that. I thought there were much simpler methods of getting the text, at which point you could just execute your trim() and put it back. But maybe I'm wrong, I don't even have a copy of the AI10 API to look at anymore, and the newer ones don't contain the old text suites since they're history.

Votes

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