We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Words for changing the bold attribute for bookmarks after setting BIDI font value to true

Hi,

this M.Atef Senior consultant in NBK,

I am using Aspose.word to create template word documents,my templates contain alot of book marks and some of those book marks has Bold attribute equal true.whlie i was using font.BIDI to write arabic words as is and setting this BIDI=true.i notice that my book marks bold attribute was reseted to false.so i need to use BIDI=true without reseting book marks bold attribute.any body can help me?this is my contact

mada_fci@hotmail.com

Thanks

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Please try also set Font.BoldBi = true; I think this should help you. Also please attach your document for testing and provide me your code.

Best regards.

Hi,

Thanks for your response ,

i am already put font.bidi=true but it reset the bold attribute for the book marks to false.which note accepted.i need to use the font.bidi=true without reset the bold attribute for my book marks.i hope you get my issue.

note the font.bidi=true reset the Bold attribute only while the Italic and UnderLine attributes working fine.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. There are also properties

Font.BoldBi

Font.ItalicBi

Font.SizeBi

Please see the following link for more information.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.font.boldbi.html

So please try set Font.BoldBi to true. And attach your document and code for testing.

Best regards.

Dear,

I am already have this book marks with bold attribute =true and i have alot of book marks also i use font.bidi=true only with arabic words,note i do this process automatic so i can't know which book mark was bold and reset it.all i need how to use font.bidi=true without reset the bold attribute for the book marks.

Thanks

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please attach your document and code. I will try to reproduce the problem and provide you more information.

Best regards.

DocumentBuilder _mBuilder = new DocumentBuilder(AsposeDocument);

Bookmarks _allBookmarks = AsposeDocument.Range.Bookmarks;

if (_allBookmarks[bookmarkName] != null)

{

_mBuilder.MoveToBookmark(bookmarkName, false, true);

if(lang == "A")

{

_mBuilder.Font.Bidi = true;
_mBuilder.Font.Name = "Arabic Transparent";

}

_mBuilder.Write(inputText);

}

after applying this code if there is ant book mark was bold=true it reseted to bold=false

so how i can use this code without reseting the bold attribute.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. As I told you in my previous posts try using BoldBi property. Please try using the following code.

DocumentBuilder _mBuilder = new DocumentBuilder(AsposeDocument);

BookmarkCollection _allBookmarks = AsposeDocument.Range.Bookmarks;

if (_allBookmarks[bookmarkName] != null)

{

_mBuilder.MoveToBookmark(bookmarkName, false, true);

if (lang == "A")

{

_mBuilder.Font.Bidi = true;

_mBuilder.Font.BoldBi = _mBuilder.Font.Bold;

_mBuilder.Font.ItalicBi = _mBuilder.Font.Italic;

_mBuilder.Font.Name = "Arabic Transparent";

}

_mBuilder.Write(inputText);

}

I highlighted my changes. I hope this could help you.

Best regards.

ok,it's working now.

thank you