I'm using AODL create formated documents from csv files. It works very well, apart from applying text (font) styles to part of the text.
I tried to do a similar code as I'm using to apply paragraph styles. It works there:
Code:
t = new FormatedText(DocFile,FontStyleName, text);
when I debug the code, it does seem to apply the formating (at least the name) to t.StyleName, as well as t.TextStyle.StyleName. Anyhow, when I open the created file, the text is there, but no font styles applied at all. Even 'Default' doesn't show up in the Applied styles box.
Any suggestions?
Thanks in advance.
The administrator has disabled public write access.
The administrator has disabled public write access.
Re:applying text styles document
Date: 2008/07/19 16:57
By: Eszter
Status: User
Karma: 0  
Fresh Boarder
Posts: 3
Hi Bitnapper,
thanks for your answer. anyhow... It doesn't work for me. Basically I do the same as you do in your first version:
Code:
//load an existing document
//create a content form a table I have while applying styles as defined by the user
//loop through table
paragraph = ParagraphBuilder.CreateStandardTextParagraph( document );
paragraph.StyleName = "Title";
formattedText = new FormatedText( document, "txtHeadline", "..." );
paragraph.TextContent.Add( formattedText );
document.Content.Add( paragraph );
//save file to different location
I looked into content.xml to see what does it write there. I found one line that if I remove it the file looks good:
I downloaded the source code of AODL, but have to say got a bit lost at first site.
If you know where to start looking for this in the source code would be of help.
Thanks
Eszter
The administrator has disabled public write access.
Re:applying text styles document
Date: 2008/07/20 22:40
By: Eszter
Status: User
Karma: 0  
Fresh Boarder
Posts: 3
For the benefit of those who run into the same problem:
I commented line 623 in TextDocument.cs in the AODL source code.
Code:
//this.CreateLocalStyleContent();
I tested a bit, and it does not seem to create problem for me so far, and the character styles work fine. I hope it stays that way
The administrator has disabled public write access.