0
私はAspose.Wordでコンテンツのテーブルを作成しますが、ドキュメントの方向は右から左です。方向をrtlに変更したいと思います。C#.Netのaspose.wordでTOCの方向を変更する方法
私はAspose.Wordでコンテンツのテーブルを作成しますが、ドキュメントの方向は右から左です。方向をrtlに変更したいと思います。C#.Netのaspose.wordでTOCの方向を変更する方法
次のコード例を使用して、コンテンツの表を右から左の方向に作成してください。これがあなたを助けることを願っています
Document doc = new Document(MyDir + "in.docx");
// Create a document builder to insert content with into document.
DocumentBuilder builder = new DocumentBuilder(doc);
// Specify the locale so Microsoft Word recognizes this text as Arabic - Saudi Arabia.
builder.Font.LocaleIdBi = 1025;
builder.ParagraphFormat.Bidi = true;
builder.Font.NameBi = "Heading 1";
builder.Font.SizeBi = 10;
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.Font.Bidi = true;
doc.Styles[StyleIdentifier.Toc1].ParagraphFormat.Bidi = true;
doc.Styles[StyleIdentifier.Toc1].Font.Bidi = true;
builder.InsertTableOfContents("\\o \"1-3\" \\h \\z \\u");
builder.Writeln();
builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading1;
builder.Writeln("مرحبا هناك ما هو اسمك وماذا تفعل في هذا");
// Call the method below to update the TOC.
doc.UpdateFields();
doc.Save(MyDir + "output.docx");
私は開発者エバンジェリストとしてAsposeを使用しています。
何を試しましたか? [mcve] – LocEngineer
https://stackoverflow.com/help/mcveを入力してください –