InsertStructuredDocumentTag
İçindekiler
[
Saklamak
]DocumentBuilder.InsertStructuredDocumentTag method
Bir eklerStructuredDocumentTag
belgeye.
public StructuredDocumentTag InsertStructuredDocumentTag(SdtType type)
Geri dönüş değeri
TheStructuredDocumentTag
yeni eklenen düğüm.
Örnekler
Yapılandırılmış belge etiketinin nasıl kolayca ekleneceğini gösterir.
Document doc = new Document(MyDir + "Rendering.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveTo(doc.FirstSection.Body.Paragraphs[3]);
// Yalnızca aşağıdaki StructuredDocumentTag türlerinin eklenmesine izin verildiğini unutmayın:
// SdtType.PlainText, SdtType.RichText, SdtType.Onay Kutusu, SdtType.Açılır Liste,
// SdtType.ComboBox, SdtType.Resim, SdtType.Tarih.
// Eklenen StructuredDocumentTag'in işaretleme düzeyi otomatik olarak algılanacak ve eklenecek konuma bağlı olacaktır.
// StructuredDocumentTag eklendi, paragraf ve yazı tipi biçimlendirmesini imleç konumundan devralacak.
StructuredDocumentTag sdtPlain = builder.InsertStructuredDocumentTag(SdtType.PlainText);
doc.Save(ArtifactsDir + "StructuredDocumentTag.InsertStructuredDocumentTag.docx");
Ayrıca bakınız
- class StructuredDocumentTag
- enum SdtType
- class DocumentBuilder
- ad alanı Aspose.Words
- toplantı Aspose.Words