Skip to main content

Toto RoToto's Library tagged adobe   View Popular

04 Jun 08

Adobe Forums - New TextRange?


I'm sorry you feel frustrated with the text api and documentation.

As you know a text range is a range of characters from a start offset to an end offset, so you can get the text range of a single character, a word, a text run, a glyph run, a paragraph, a text frame, a story or all the stories in the document by iterating the correct container - e.g an IWordsIterator, ITextRunsIterator, ITextLinesIterator, IGlyphRunsIterator, IParagraphsIterator, ITextFramesIterator, IStory, IStories. An ITextRange can contain anything from a single character in a text frame to the entire contents of the document throught the IStories set.

An ITextRun is a range of text with the same features, so if you had a text frame containing 2 lines of text and you changed a single feature attribute, like the font of one of those lines, you would then have 2 text runs - one run would contain the text with the original font, the other would contain the text with the new font.

The following code i took from your original sample and created a new code snippet, which runs in the new SnippetRunner plug-in which will be released in an updated version of the SDK in the next few days. Also in the new SDK is a document called Using the Adobe Text Engine which provides recipes for creating, editing, deleting and styling text.

# /* / ASErr SnpTest::Do(void)
{
ASErr result = kNoErr;
try {
AIArtSet artSet = NULL;
result = sAIArtSet->NewArtSet(&artSet);
aisdk::check_ai_error(result);

AIArtSpec specs[1] = {{kTextFrameArt,0,0}};
result = sAIArtSet->MatchingArtSet(specs, 1, artSet);
aisdk::check_ai_error(result);

AIArtHandle textArtHandle = NULL;
result = sAIArtSet->IndexArtSet(artSet, 0, &textArtHandle);
aisdk::check_ai_error(result);

ATE::TextRangeRef textRange = NULL;
char* thisWord = "test ";

result = sAITextFrame->GetATETextRange(textArtHandle, &textRange);
aisdk::check_ai_error(result);

ATE::ITextRange firstRange(textRange);
firstRange.InsertAfter(thisWord);

ATE::ITextRange newRange = firstRange.C

www.adobeforums.com/...5 - Preview

textrange sdk ate adobe illustrator cs3 explanations

28 Mar 08

the WPF way...: XAML Exporter for Illustrator using the CS2 COM Type Library

a another solution to export ai files in wpf solutions.
(using the CS2-3 Com type library).

NB: need to fix bug. replace, with . in the xaml generated file.

pavanpodila.spaces.live.com/...cns!9C9E888164859398!172.entry - Preview

WPF Xaml adobe export illustrator interop silverlight2.0

1 - 15 of 15
Showing 20 items per page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo