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를 입력하십시오. –