2017-11-15 9 views

答えて

3

次のコード例を使用して、コンテンツの表を右から左の方向に作成してください。これがあなたを助けることを願っています

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を使用しています。

関連する問題