Class WordDocument
Inheritance
System.Object
WordDocument
Assembly: IronWord.dll
Syntax
public class WordDocument : Object, IElementContainer, ITextContainer, IDrawContainer
Constructors
WordDocument()
Declaration
WordDocument(ContentElement[])
Declaration
public WordDocument(params ContentElement[] children)
Parameters
WordDocument(Byte[])
Declaration
public WordDocument(byte[] bytes)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
bytes |
|
WordDocument(String)
Declaration
public WordDocument(string filePath)
Parameters
| Type |
Name |
Description |
| System.String |
filePath |
|
Properties
Children
Declaration
public ContentElementCollection Children { get; }
Property Value
Height
Declaration
public double Height { get; }
Property Value
| Type |
Description |
| System.Double |
|
MarginBottom
Declaration
public double MarginBottom { get; }
Property Value
| Type |
Description |
| System.Double |
|
MarginLeft
Declaration
public double MarginLeft { get; }
Property Value
| Type |
Description |
| System.Double |
|
MarginRight
Declaration
public double MarginRight { get; }
Property Value
| Type |
Description |
| System.Double |
|
MarginTop
Declaration
public double MarginTop { get; }
Property Value
| Type |
Description |
| System.Double |
|
MultiLevelTextLists
Declaration
public List<MultiLevelTextList> MultiLevelTextLists { get; }
Property Value
PageCount
Declaration
public int PageCount { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
PageIndex
Declaration
public int PageIndex { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
PageSetup
Declaration
public PageSetup PageSetup { get; }
Property Value
Paragraphs
Declaration
public List<Paragraph> Paragraphs { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<Paragraph> |
|
Tables
Declaration
public List<Table> Tables { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<Table> |
|
Texts
Declaration
public List<TextContent> Texts { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<TextContent> |
|
Width
Declaration
public double Width { get; }
Property Value
| Type |
Description |
| System.Double |
|
Methods
AddChild(ContentElement[])
Declaration
public void AddChild(params ContentElement[] children)
Parameters
AddImage(AnyBitmap)
Declaration
public ImageContent AddImage(AnyBitmap anyBitmap)
Parameters
| Type |
Name |
Description |
| IronSoftware.Drawing.AnyBitmap |
anyBitmap |
|
Returns
AddImage(ImageContent)
Declaration
public ImageContent AddImage(ImageContent imageContent)
Parameters
Returns
AddImage(Stream)
Declaration
public ImageContent AddImage(Stream imageStream)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
imageStream |
|
Returns
AddImage(String)
Declaration
public ImageContent AddImage(string imagePath)
Parameters
| Type |
Name |
Description |
| System.String |
imagePath |
|
Returns
AddMultiLevelTextList(MultiLevelTextList)
Declaration
public MultiLevelTextList AddMultiLevelTextList(MultiLevelTextList multiLevelTextList)
Parameters
Returns
AddParagraph(Paragraph)
Declaration
public Paragraph AddParagraph(Paragraph paragraph)
Parameters
Returns
AddSection()
Declaration
AddSection(DocumentSection)
Declaration
public void AddSection(DocumentSection documentSection)
Parameters
AddShape(ShapeContent)
Declaration
public ShapeContent AddShape(ShapeContent shapeContent)
Parameters
Returns
AddTable(Table)
Declaration
public Table AddTable(Table table)
Parameters
| Type |
Name |
Description |
| Table |
table |
|
Returns
AddText(TextContent)
Declaration
public TextContent AddText(TextContent textContentRun)
Parameters
Returns
AddText(String)
Declaration
public TextContent AddText(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Returns
Declaration
public List<AnyBitmap> ExtractImages()
Returns
| Type |
Description |
| System.Collections.Generic.List<IronSoftware.Drawing.AnyBitmap> |
|
Declaration
public List<IReadOnlyCollection<IPathSegment>> ExtractShapes()
Returns
| Type |
Description |
| System.Collections.Generic.List<System.Collections.Generic.IReadOnlyCollection<IronSoftware.IPathSegment>> |
|
Declaration
public string ExtractText()
Returns
| Type |
Description |
| System.String |
|
Declaration
public string ExtractTextFromPage(int PageIndex)
Parameters
| Type |
Name |
Description |
| System.Int32 |
PageIndex |
|
Returns
| Type |
Description |
| System.String |
|
Declaration
public string ExtractTextFromPages(IEnumerable<int> PageIndices)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<System.Int32> |
PageIndices |
|
Returns
| Type |
Description |
| System.String |
|
FindText(String)
Declaration
public TextContent FindText(string find)
Parameters
| Type |
Name |
Description |
| System.String |
find |
|
Returns
LogObjectTree()
Declaration
public void LogObjectTree()
Remove(TextContent)
Declaration
public bool Remove(TextContent element)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
ReplaceText(String, String)
Declaration
public void ReplaceText(string find, string replace)
Parameters
| Type |
Name |
Description |
| System.String |
find |
|
| System.String |
replace |
|
Save()
Declaration
Returns
| Type |
Description |
| System.Byte[] |
|
Save(String)
Declaration
public void Save(string filePath)
Parameters
| Type |
Name |
Description |
| System.String |
filePath |
|
SaveAs(String)
Declaration
public void SaveAs(string filePath)
Parameters
| Type |
Name |
Description |
| System.String |
filePath |
|
ToJson()
Declaration
Returns
| Type |
Description |
| System.String |
|
Implements