العمل مع الحواشي السفلية والتعليقات الختامية

يوفر Aspose.Words أيضًا بعض الفئات والأساليب والخصائص للتعامل مع الحواشي السفلية والتعليقات الختامية.

قم بإدراج تعليق ختامي وتعيين خيارات الترقيم

إذا كنت تريد إدراج حاشية سفلية أو تعليق ختامي في مستند Word، فيرجى استخدام طريقة InsertFootnote. تقوم هذه الطريقة بإدراج حاشية سفلية أو تعليق ختامي في المستند.

تمثل فئتا EndnoteOptions وFootnoteOptions خيارات ترقيم للحواشي السفلية والتعليقات الختامية.

يوضح مثال التعليمات البرمجية التالي كيفية إدراج تعليق ختامي في المستند وتعيين خيارات الترقيم الخاصة به:

// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET
Document doc = new Document(dataDir + "TestFile.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write("Some text");
builder.InsertFootnote(FootnoteType.Endnote, "Eootnote text.");
EndnoteOptions option = doc.EndnoteOptions;
option.RestartRule = FootnoteNumberingRule.RestartPage;
option.Position = EndnotePosition.EndOfSection;
dataDir = dataDir + "TestFile_Out.doc";
// Save the document to disk.
doc.Save(dataDir);

تعيين عدد أعمدة تخطيط الحواشي السفلية

يمكنك ضبط عدد أعمدة تخطيط الحواشي السفلية باستخدام خاصية Columns. إذا كانت قيمة هذه الخاصية 0، فسيتم تنسيق منطقة الحواشي السفلية بعدد من الأعمدة بناءً على عدد الأعمدة في الصفحة المعروضة.

يوضح مثال التعليمات البرمجية التالي كيفية تعيين عدد الأعمدة لتخطيط الحاشية السفلية:

// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET
Document doc = new Document(dataDir + "TestFile.docx");
//Specify the number of columns with which the footnotes area is formatted.
doc.FootnoteOptions.Columns = 3;
dataDir = dataDir + "TestFile_Out.doc";
// Save the document to disk.
doc.Save(dataDir);

قم بتعيين موضع الحاشية السفلية والملاحظة الختامية

يمكن أن يكون موضع الحاشية السفلية في أسفل كل صفحة أو أسفل النص الموجود في كل صفحة. يمكن أن يكون موضع التعليق الختامي في نهاية القسم أو في نهاية المستند.

يوضح مثال التعليمات البرمجية التالي كيفية تعيين موضع الحاشية السفلية والتعليق الختامي:

// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET
Document doc = new Document(dataDir + "TestFile.docx");
//Set footnote and endnode position.
doc.FootnoteOptions.Position = FootnotePosition.BeneathText;
doc.EndnoteOptions.Position = EndnotePosition.EndOfSection;
dataDir = dataDir + "TestFile_Out.doc";
// Save the document to disk.
doc.Save(dataDir);