|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.spire.doc.OwnerHolder
com.spire.doc.documents.xml.DocumentSerializable
com.spire.doc.DocumentObject
com.spire.doc.DocumentBase
com.spire.doc.DocumentContainer
com.spire.doc.Document
public class Document
| Field Summary | |
|---|---|
BookmarkLevelHandler |
BookmarkLayout
Occurs when draw a bookmark. |
PageLayoutHandler |
PageLayout
Occurs when creating a new page. |
UpdateFieldsHandler |
UpdateFields
Occurs when update field. |
| Constructor Summary | |
|---|---|
|
Document()
Initializes a new instance of the Document class. |
protected |
Document(Document doc)
|
|
Document(java.io.InputStream stream)
Initializes a new instance of the Document class from the stream. |
|
Document(java.io.InputStream inputStream,
FileFormat type)
Initializes a new instance of the Document class from the stream. |
|
Document(java.io.InputStream inputStream,
FileFormat type,
java.lang.String password)
Initializes a new instance of the Document class from the stream of specified type protected with password. |
|
Document(java.io.InputStream stream,
FileFormat type,
XHTMLValidationType validationType)
Initializes a new instance of the Document class example:Loading an existing word document. |
|
Document(java.io.InputStream inputStream,
java.lang.String password)
Initializes a new instance of the Document class from the Word document�s stream, which is protected with password. |
|
Document(java.lang.String fileName)
Initializes a new instance of the Document class from Word document. |
|
Document(java.lang.String fileName,
FileFormat type)
Initializes a new instance of the Document class. |
|
Document(java.lang.String fileName,
FileFormat type,
java.lang.String password)
Initializes a new instance of the Document class from existing file of specified type protected with password. |
|
Document(java.lang.String fileName,
FileFormat type,
XHTMLValidationType validationType)
Initializes a new instance of the Document class. |
|
Document(java.lang.String fileName,
java.lang.String password)
Initializes a new instance of the Document class from existing Word document, which is protected with password. |
| Method Summary | |
|---|---|
void |
acceptChanges()
Accepts changes tracked from the moment of last change acceptance. |
ListStyle |
addListStyle(ListType listType,
java.lang.String styleName)
Adds new list style to document. |
ParagraphStyle |
addParagraphStyle(java.lang.String styleName)
Adds new paragraph style to the document. |
Section |
addSection()
Adds new section to document. |
Style |
addStyle(BuiltinStyle builtinStyle)
Adds the style to the document style. |
void |
clearMacros()
Removes the macros from the document. |
void |
cloneCompatibilityTo(Document destDoc)
Clones the current document compatibility to the destination document. |
void |
cloneDefaultStyleTo(Document destDoc)
Clones the current document default style to the destination document. |
void |
cloneThemesTo(Document destDoc)
Clones the current document theme style to the destination document. |
void |
close()
Closes this instance. |
void |
createMinialDocument()
Create a minial document, one empty section to the document and one empty paragraph to created section. |
Paragraph |
createParagraph()
Creates the paragraph. |
ParagraphBase |
createParagraphItem(ParagraphItemType itemType)
Creates new paragraph item instance. |
Document |
deepClone()
Clones itself. |
void |
dispose()
Prerforms application-defined tasks associated with freeing,releasing, or resetting unmanaged resources. |
void |
encrypt(java.lang.String password)
Encrypts the document. |
TextSelection[] |
findAllPattern(java.util.regex.Pattern pattern)
Returns all entries of matchString regex. |
TextSelection[] |
findAllString(java.lang.String matchString,
boolean caseSensitive,
boolean wholeWord)
Returns all entries of matchString string, taking into consideration caseSensitive and wholeWord options. |
TextSelection |
findPattern(BodyRegion start,
java.util.regex.Pattern pattern)
Finds the next entry of matchString pattern. |
TextSelection |
findPattern(java.util.regex.Pattern pattern)
Finds and returns entry of specified regular expression along with formatting. |
TextSelection[] |
findPatternInLine(BodyRegion start,
java.util.regex.Pattern pattern)
Finds the text which fit the specified pattern starting from start. |
TextSelection[] |
findPatternInLine(java.util.regex.Pattern pattern)
Finds the first entry of specified pattern in single-line mode. |
TextSelection |
findString(BodyRegion start,
java.lang.String matchString,
boolean caseSensitive,
boolean wholeWord)
Finds the next entry of matchString string, taking into consideration caseSensitive and wholeWord options. |
TextSelection |
findString(java.lang.String stringValue,
boolean caseSensitive,
boolean wholeWord)
Finds and returns string along with formatting. |
TextSelection[] |
findStringInLine(BodyRegion start,
java.lang.String matchString,
boolean caseSensitive,
boolean wholeWord)
Finds the next matchString text starting from specified using single-line mode. |
TextSelection[] |
findStringInLine(java.lang.String given,
boolean caseSensitive,
boolean wholeWord)
Finds the first entry of matchString text in single-line mode. |
Background |
getBackground()
Gets document's background |
BookmarkCollection |
getBookmarks()
Gets document bookmarks. |
BuiltinDocumentProperties |
getBuiltinDocumentProperties()
Gets document built-in properties object. |
DocumentObjectCollection |
getChildObjects()
Gets the child entities. |
CommentsCollection |
getComments()
Gets comments item of the document. |
CustomDocumentProperties |
getCustomDocumentProperties()
Gets document custom properties object. |
FileFormat |
getDetectedFormatType()
Returns the detected format type of the document which was loaded. |
DocumentObjectType |
getDocumentObjectType()
Gets the type of the document object. |
boolean |
getEmbedFontsInFile()
Gets a value indicating whether save fonts that are used in the document in the file. |
boolean |
getEmbedSystemFonts()
Gets a value indicating whether save system fonts that are used in the document in the file. |
FootEndnoteOptions |
getEndnoteOptions()
Gets options that control numbering and positioning of endnotes in this document. |
java.util.List<Footnote> |
getEndnotes()
Gets document endnotes. |
FieldCollection |
getFields()
Gets fields of the documnet. |
FootEndnoteOptions |
getFootnoteOptions()
Gets options that control numbering and positioning of footnotes in this document. |
java.util.List<Footnote> |
getFootnotes()
Gets document footnotes. |
java.lang.String |
getHtmlBaseUrl()
Gets the Base path which is used to convert the relative path to absolute path. |
boolean |
getHTMLCustomComment()
Gets a value specifying whether parsing and writing comment of document in HTML. |
HtmlExportOptions |
getHtmlExportOptions()
Gets the save options. |
java.util.List |
getHTMLIdentifierPunctuations()
|
boolean |
getHTMLSentenceIdentifier()
Gets a value specifying whether to add identifier to a sentence when writing to HTML. |
boolean |
getHTMLTrackChanges()
Gets a value specifying whether parsing and writing custom Change_Tracking HTML Tags are supported. |
boolean |
getKeepSameFormat()
Gets a value that indicates whether to keep same formatting when it is merged to other document. |
Paragraph |
getLastParagraph()
Gets last section object. |
Section |
getLastSection()
Gets last section of the document. |
ListStyleCollection |
getListStyles()
Gets document list styles. |
MailMerge |
getMailMerge()
Gets mail merge engine. |
int |
getPageCount()
Gets total number of pages for document. |
int |
getPageCountEx()
Gets total number of pages for document. |
com.spire.ms.Printing.PrintDocument |
getPrintDocument()
|
java.util.List<PrivateFontPath> |
getPrivateFontList()
Gets the private font list. |
DocumentProperties |
getProperties()
Gets the document properties. |
ProtectionType |
getProtectionType()
Gets the type of protection of the document. |
boolean |
getQuiteMode()
Gets whether is quite mode. |
boolean |
getReplaceFirst()
Gets a value indicating whether need first replacing. |
SectionCollection |
getSections()
Gets document sections. |
StyleCollection |
getStyles()
Gets document styles |
java.lang.String |
getText()
Gets the document's text. |
TextBoxCollection |
getTextBoxes()
Get textbox items of main document |
TableOfContent |
getTOC()
Gets the TOC element of the word document. |
boolean |
getTrackChanges()
Gets a value indicating whether tracking changes is turn on. |
VariableCollection |
getVariables()
Gets the document variables. |
ViewSetup |
getViewSetup()
Gets view setup options in Microsoft word. |
WatermarkBase |
getWatermark()
Gets document's watermark. |
XHTMLValidationType |
getXHTMLValidateOption()
Gets the HTML validate option.the default value is None. |
boolean |
hasChanges()
Gets a value indicating whether the document has tracked changes. |
void |
importContent(IDocument doc)
Imports all content into the document. |
void |
importContent(IDocument doc,
boolean importStyles)
Imports all content into document. |
void |
importSection(ISection section)
Imports section into document. |
void |
insertTextFromFile(java.lang.String fileName,
FileFormat fileFormat)
Insert text from a file. |
void |
insertTextFromStream(java.io.InputStream stream,
FileFormat fileFormat)
Insert text from stream. |
boolean |
isContainMacro()
Indicates whether the document has macros. |
boolean |
isUpdateFields()
Gets a value indicating whether to update fields in the document. |
void |
isUpdateFields(boolean value)
Sets a value indicating whether to update fields in the document. |
void |
loadFromFile(java.lang.String fileName)
Opens doc file. |
void |
loadFromFile(java.lang.String fileName,
FileFormat fileFormat)
Opens the document from file in Xml or Microsoft Word format. |
void |
loadFromFile(java.lang.String fileName,
FileFormat fileFormat,
java.lang.String password)
Opens the document from file in Xml or Microsoft Word format. |
void |
loadFromFile(java.lang.String fileName,
FileFormat fileFormat,
XHTMLValidationType validationType)
Opens the HTML document from stream . |
void |
loadFromFileInReadMode(java.lang.String strFileName,
FileFormat fileFormat)
LoadFromStream new document in read-only mode. |
void |
loadFromStream(java.io.InputStream stream,
FileFormat fileFormat)
Opens the document from stream in Xml or Microsoft Word format. |
void |
loadFromStream(java.io.InputStream stream,
FileFormat fileFormat,
java.lang.String password)
Opens the document from stream in Xml or Microsoft Word format. |
void |
loadFromStream(java.io.InputStream stream,
FileFormat fileFormat,
XHTMLValidationType validationType)
Opens the HTML document from stream . |
void |
loadRtf(java.io.InputStream stream)
Opens the rtf document from a stream. |
void |
loadRtf(java.io.InputStream stream,
java.nio.charset.Charset charset)
Opens the rtf document with specified encoding from a stream. |
void |
loadRtf(java.lang.String fileName)
Opens the rtf document from a file. |
void |
loadRtf(java.lang.String fileName,
java.nio.charset.Charset charset)
Opens the rtf document with specified encoding from a file. |
void |
loadText(java.io.InputStream stream)
Opens the text document from a stream with default encoding utf-8. |
void |
loadText(java.io.InputStream stream,
java.nio.charset.Charset charset)
Opens the text document with specified encoding from a stream. |
void |
loadText(java.lang.String fileName)
Opens the text document from a file with default encoding utf-8. |
void |
loadText(java.lang.String fileName,
java.nio.charset.Charset charset)
Opens the text document with specified encoding from a file. |
void |
protect(ProtectionType type)
Protects the document. |
void |
protect(ProtectionType type,
java.lang.String password)
Protects the document. |
void |
rejectChanges()
Rejects changes tracked from the moment of last change acceptance. |
void |
removeEncryption()
Removes the encryption. |
int |
replace(java.util.regex.Pattern pattern,
java.lang.String replace)
Replaces all entries of matchString regular expression with newValue string. |
int |
replace(java.util.regex.Pattern pattern,
TextSelection textSelection)
.Replaces all entries of matchString regular expression with TextRangesHolder. |
int |
replace(java.lang.String matchString,
IDocument matchDoc,
boolean caseSensitive,
boolean wholeWord)
Replaces the specified matchString. |
int |
replace(java.lang.String matchString,
java.lang.String newValue,
boolean caseSensitive,
boolean wholeWord)
Replaces all entries of matchString string with newValue string, taking into consideration caseSensitive and wholeWord options. |
int |
replace(java.lang.String matchString,
TextSelection textSelection,
boolean caseSensitive,
boolean wholeWord)
Replaces all entries of matchString string with TextSelection, taking into consideration caseSensitive and wholeWord options. |
int |
replaceInLine(java.util.regex.Pattern pattern,
java.lang.String newValue)
Replaces all entries with specified pattern with newValue text in single-line mode. |
int |
replaceInLine(java.util.regex.Pattern pattern,
TextSelection matchSelection)
Replaces the matchString pattern with matchSelection in single-line mode. |
int |
replaceInLine(java.lang.String matchString,
java.lang.String newValue,
boolean caseSensitive,
boolean wholeWord)
Replaces all entries of matchString text with newValue text in single-line mode. |
int |
replaceInLine(java.lang.String matchString,
TextSelection matchSelection,
boolean caseSensitive,
boolean wholeWord)
Replaces the matchString text with matchSelection in single-line mode. |
void |
resetFindState()
Resets the FindPattern. |
void |
saveToEpub(java.io.OutputStream stream,
DocPicture coverImage)
Saves the EPUB document. |
void |
saveToEpub(java.lang.String fileName,
DocPicture coverImage)
Saves the EPUB document. |
void |
saveToFile(java.io.OutputStream stream,
FileFormat fileFormat)
Saves the document into stream in Xml or Microsoft Word format. |
void |
saveToFile(java.lang.String fileName)
Saves to file in Microsoft Word format. |
void |
saveToFile(java.lang.String fileName,
FileFormat fileFormat)
Saves the document to file in Xml or Microsoft Word format. |
void |
saveToFile(java.lang.String fileName,
FileFormat fileFormat,
byte[] certificateData,
java.lang.String securePassword)
Saves document to file and digitally sign, Only DOC and DOCX are supported. |
void |
saveToFile(java.lang.String fileName,
FileFormat fileFormat,
java.lang.String certificatePath,
java.lang.String securePassword)
Saves document to file and digitally sign, Only DOC and DOCX are supported. |
void |
saveToFile(java.lang.String fileName,
java.util.List embeddedFontNameList)
Embedding fonts to PDF document. |
void |
saveToFile(java.lang.String fileName,
ToPdfParameterList paramList)
Saves the document to PDF file. |
java.awt.image.BufferedImage[] |
saveToImages(ImageType type)
Save the whole document into images |
java.awt.image.BufferedImage |
saveToImages(int pageIndex,
ImageType type)
Save the specified page into image |
java.awt.image.BufferedImage[] |
saveToImages(int pageIndex,
int pageCount,
ImageType type)
Save the specified range of pages into images |
void |
saveToStream(java.io.OutputStream stream,
FileFormat fileFormat)
Saves the document into stream in Xml or Microsoft Word format. |
void |
saveToStream(java.io.OutputStream stream,
FileFormat fileFormat,
byte[] certificateData,
java.lang.String securePassword)
Saves document to stream and digitally sign, Only DOC and DOCX are supported. |
void |
saveToStream(java.io.OutputStream stream,
FileFormat fileFormat,
java.lang.String certificatePath,
java.lang.String securePassword)
Saves document to stream and digitally sign, Only DOC and DOCX are supported. |
void |
saveToStream(java.io.OutputStream stream,
ToPdfParameterList paramList)
Embedding fonts to PDF document. |
void |
saveToStream(com.spire.ms.System.IO.Stream stream,
FileFormat fileFormat,
byte[] certificateData,
java.lang.String securePassword)
Saves document to stream and digitally sign, Only DOC and DOCX are supported. |
java.util.List<byte[]> |
saveToSVG()
Saves the SVG. |
void |
saveToSVG(java.lang.String fileName)
Saves the SVG. |
void |
saveToTxt(java.lang.String fileName,
java.nio.charset.Charset charset)
Saves to text document with specified encoding. |
void |
setEmbedFontsInFile(boolean value)
Sets a value indicating whether save fonts that are used in the document in the file. |
void |
setEmbedSystemFonts(boolean value)
Sets a value indicating whether save system fonts that are used in the document in the file. |
void |
setHtmlBaseUrl(java.lang.String value)
Sets the Base path which is used to convert the relative path to absolute path. |
void |
setHTMLCustomComment(boolean value)
Sets a value specifying whether parsing and writing comment of document in HTML. |
void |
setHTMLIdentifierPunctuations(java.util.List value)
Set the custom punctuation as sentence indentifier. |
void |
setHTMLSentenceIdentifier(boolean value)
Sets a value specifying whether to add identifier to a sentence when writing to HTML. |
void |
setHTMLTrackChanges(boolean value)
sets a value specifying whether parsing and writing custom Change_Tracking HTML Tags are supported. |
void |
setJPEGQuality(int value)
sets the quality (Q%) of the image of JPEG format, this property is only used for doc to pdf. |
void |
setKeepSameFormat(boolean value)
Sets a value that indicates whether to keep same formatting when it is merged to other document. |
void |
setProtectionType(ProtectionType value)
Sets the type of protection of the document. |
void |
setQuiteMode(boolean value)
Sets whether is quite mode. |
void |
setReplaceFirst(boolean value)
Sets a value indicating whether need first replacing. |
void |
setTextBoxes(TextBoxCollection value)
Set textbox items of main document |
void |
setTOC(TableOfContent value)
Sets the TOC element of the word document. |
void |
setTrackChanges(boolean value)
Sets a value indicating whether tracking changes is turn on. |
void |
setWatermark(WatermarkBase value)
Sets document's watermark. |
void |
setXHTMLValidateOption(XHTMLValidationType value)
Sets the HTML validate option.the default value is None. |
static byte[] |
sign(java.io.InputStream sourceStream,
byte[] certificateData,
java.lang.String securePassword)
Create digitally signed word document. |
static byte[] |
sign(java.io.InputStream sourceStream,
java.lang.String certificatePath,
java.lang.String securePassword)
Create digitally signed word document. |
void |
updateTableOfContents()
Update Table of contents in the document. |
void |
updateTableOfContents(TableOfContent toc)
|
void |
updateWordCount()
Update Paragraphs count, Word count and Character count |
void |
updateWordCount(char[] splitchar)
Update Paragraphs count, Word count and Character count. |
void |
updateWordCount(char[] splitchar,
boolean includeTbFnEn)
Update Paragraphs count, Word count and Character count. |
| Methods inherited from class com.spire.doc.DocumentObject |
|---|
getFirstChild, getLastChild, getNextSibling, getOwner, getPreviousSibling, isComposite, toString |
| Methods inherited from class com.spire.doc.OwnerHolder |
|---|
getDocument |
| Methods inherited from interface com.spire.doc.interfaces.IDocumentObject |
|---|
getDocument, getNextSibling, getOwner, getPreviousSibling, isComposite |
| Field Detail |
|---|
public BookmarkLevelHandler BookmarkLayout
public PageLayoutHandler PageLayout
public UpdateFieldsHandler UpdateFields
| Constructor Detail |
|---|
public Document(java.lang.String fileName)
fileName - Name of the file.
public Document(java.lang.String fileName,
java.lang.String password)
fileName - Name of the file.password - The password.
public Document(java.lang.String fileName,
FileFormat type)
Document class.
example:Loading an existing word document.
Document doc = new Document("Sample.docx", FormatType.docx);
fileName - Name of the file.type - The type.
public Document(java.lang.String fileName,
FileFormat type,
XHTMLValidationType validationType)
Document class.
example:Loading an existing word document.
Document docSource1 = new Document("sample.doc",FormatType.Doc,XHTMLValidationType.Strict);
fileName - Name of the filetype - The type of the opened document.validationType - The XHTML validation type.
public Document(java.lang.String fileName,
FileFormat type,
java.lang.String password)
fileName - Name of the file.type - The type.password - The password.
public Document(java.io.InputStream stream,
FileFormat type,
XHTMLValidationType validationType)
stream - The file stream.type - The type of the opened document.validationType - Type of the validation.public Document()
Document class.
example:A new document is created.
Document document = new Document();
public Document(java.io.InputStream stream)
stream - The stream.
public Document(java.io.InputStream inputStream,
FileFormat type)
inputStream - The inputStream.type - The type.
public Document(java.io.InputStream inputStream,
java.lang.String password)
inputStream - The stream.password - The password.
public Document(java.io.InputStream inputStream,
FileFormat type,
java.lang.String password)
inputStream - The stream.type - The type.password - The password.protected Document(Document doc)
| Method Detail |
|---|
public TableOfContent getTOC()
getTOC in interface IDocumentpublic void setTOC(TableOfContent value)
setTOC in interface IDocumentvalue - TableOfContentpublic boolean getEmbedFontsInFile()
public void setEmbedFontsInFile(boolean value)
value - booleanpublic java.util.List<PrivateFontPath> getPrivateFontList()
public boolean getEmbedSystemFonts()
public void setEmbedSystemFonts(boolean value)
value - booleanpublic java.lang.String getHtmlBaseUrl()
public void setHtmlBaseUrl(java.lang.String value)
value - Stringpublic boolean getHTMLTrackChanges()
public void setHTMLTrackChanges(boolean value)
value - booleanpublic boolean getHTMLSentenceIdentifier()
public void setHTMLSentenceIdentifier(boolean value)
value - boolean valuepublic boolean getHTMLCustomComment()
public void setHTMLCustomComment(boolean value)
value - boolean valuepublic java.util.List getHTMLIdentifierPunctuations()
public void setHTMLIdentifierPunctuations(java.util.List value)
value - Listpublic java.util.List<Footnote> getFootnotes()
public java.util.List<Footnote> getEndnotes()
public DocumentObjectType getDocumentObjectType()
getDocumentObjectType in interface IDocumentObjectgetDocumentObjectType in class DocumentObjectpublic BuiltinDocumentProperties getBuiltinDocumentProperties()
getBuiltinDocumentProperties in interface IDocumentpublic CustomDocumentProperties getCustomDocumentProperties()
getCustomDocumentProperties in interface IDocumentpublic SectionCollection getSections()
getSections in interface IDocumentpublic StyleCollection getStyles()
getStyles in interface IDocumentpublic ListStyleCollection getListStyles()
getListStyles in interface IDocumentpublic BookmarkCollection getBookmarks()
getBookmarks in interface IDocumentpublic FieldCollection getFields()
public CommentsCollection getComments()
getComments in interface IDocumentpublic TextBoxCollection getTextBoxes()
getTextBoxes in interface IDocumentpublic void setTextBoxes(TextBoxCollection value)
value - TextBoxCollectionpublic Section getLastSection()
getLastSection in interface IDocumentpublic Paragraph getLastParagraph()
getLastParagraph in interface IDocumentpublic FootEndnoteOptions getEndnoteOptions()
public FootEndnoteOptions getFootnoteOptions()
public WatermarkBase getWatermark()
getWatermark in interface IDocumentpublic void setWatermark(WatermarkBase value)
setWatermark in interface IDocumentvalue - WatermarkBasepublic Background getBackground()
getBackground in interface IDocumentpublic MailMerge getMailMerge()
getMailMerge in interface IDocumentpublic ProtectionType getProtectionType()
getProtectionType in interface IDocumentpublic void setProtectionType(ProtectionType value)
setProtectionType in interface IDocumentvalue - ProtectionTypepublic ViewSetup getViewSetup()
getViewSetup in interface IDocumentpublic boolean getQuiteMode()
public void setQuiteMode(boolean value)
value - booleanpublic DocumentObjectCollection getChildObjects()
getChildObjects in interface ICompositeObjectgetChildObjects in class DocumentObjectpublic XHTMLValidationType getXHTMLValidateOption()
public void setXHTMLValidateOption(XHTMLValidationType value)
value - The HTML validate option.public VariableCollection getVariables()
getVariables in interface IDocumentpublic DocumentProperties getProperties()
getProperties in interface IDocumentpublic boolean hasChanges()
hasChanges in interface IDocumentpublic boolean getTrackChanges()
public void setTrackChanges(boolean value)
value - if track changes in on, set to truepublic boolean getReplaceFirst()
public void setReplaceFirst(boolean value)
value - True indciates need first replacing.public HtmlExportOptions getHtmlExportOptions()
public boolean isUpdateFields()
isUpdateFields in interface IDocumentpublic void isUpdateFields(boolean value)
isUpdateFields in interface IDocumentvalue - if update fields, set to truepublic FileFormat getDetectedFormatType()
public void setJPEGQuality(int value)
value - intpublic int getPageCount()
public com.spire.ms.Printing.PrintDocument getPrintDocument()
public boolean isContainMacro()
public boolean getKeepSameFormat()
public void setKeepSameFormat(boolean value)
value - booleanpublic Paragraph createParagraph()
createParagraph in interface IDocumentpublic void createMinialDocument()
createMinialDocument in interface IDocumentpublic Section addSection()
addSection in interface IDocumentpublic ParagraphStyle addParagraphStyle(java.lang.String styleName)
addParagraphStyle in interface IDocumentstyleName - Paragraph style name
public ListStyle addListStyle(ListType listType,
java.lang.String styleName)
addListStyle in interface IDocumentlistType - Type of the list style.styleName - List style name
public java.lang.String getText()
getText in interface IDocument
public static byte[] sign(java.io.InputStream sourceStream,
java.lang.String certificatePath,
java.lang.String securePassword)
sourceStream - Source file streamcertificatePath - Path to the file certificatesecurePassword - Password of the certificate.
public static byte[] sign(java.io.InputStream sourceStream,
byte[] certificateData,
java.lang.String securePassword)
sourceStream - Source file stream.certificateData - the certificate data.securePassword - Password of the certificate.
public Document deepClone()
deepClone in interface IDocumentdeepClone in interface IDocumentObjectdeepClone in class DocumentObjectpublic void cloneDefaultStyleTo(Document destDoc)
destDoc - The destination document.public void cloneThemesTo(Document destDoc)
destDoc - The destination document.public void cloneCompatibilityTo(Document destDoc)
destDoc - The destination document.public void importSection(ISection section)
section - The section.public void importContent(IDocument doc)
importContent in interface IDocumentdoc - The doc.
public void importContent(IDocument doc,
boolean importStyles)
importContent in interface IDocumentdoc - The doc.importStyles - If the document styles which have same names will be also imported
to the destination document,set to truepublic Style addStyle(BuiltinStyle builtinStyle)
addStyle in interface IDocumentbuiltinStyle - The built-in style.
public void acceptChanges()
public void rejectChanges()
public void protect(ProtectionType type)
protect in interface IDocumenttype - The type of the protection.
public void protect(ProtectionType type,
java.lang.String password)
protect in interface IDocumenttype - The type of the protectionpassword - The password used for protection.public void encrypt(java.lang.String password)
encrypt in interface IDocumentpassword - The passwordpublic void removeEncryption()
removeEncryption in interface IDocument
public void saveToTxt(java.lang.String fileName,
java.nio.charset.Charset charset)
fileName - Name of the file.charset - The charset.public void loadText(java.lang.String fileName)
fileName - Name of the file.public void loadText(java.io.InputStream stream)
stream - The stream.
public void loadText(java.lang.String fileName,
java.nio.charset.Charset charset)
fileName - Name of the file.charset - The charset.
public void loadText(java.io.InputStream stream,
java.nio.charset.Charset charset)
stream - The text document stream.charset - The charsetpublic void loadFromFile(java.lang.String fileName)
loadFromFile in interface IDocumentfileName - File name
public void loadFromFile(java.lang.String fileName,
FileFormat fileFormat)
loadFromFile in interface IDocumentfileName - fileFormat -
public void loadFromFile(java.lang.String fileName,
FileFormat fileFormat,
XHTMLValidationType validationType)
fileName - Name of the file.fileFormat - Type of the format.
public void loadFromFile(java.lang.String fileName,
FileFormat fileFormat,
java.lang.String password)
fileName - Name of the file.fileFormat - Type of the format.password - The password.
public void loadFromFileInReadMode(java.lang.String strFileName,
FileFormat fileFormat)
loadFromFileInReadMode in interface IDocumentstrFileName - File to open.fileFormat - Type of the format.public void loadRtf(java.lang.String fileName)
fileName - ame of the file.public void loadRtf(java.io.InputStream stream)
stream - The stream.
public void loadRtf(java.lang.String fileName,
java.nio.charset.Charset charset)
fileName - Name of the file.charset - The charset
public void loadRtf(java.io.InputStream stream,
java.nio.charset.Charset charset)
stream - The rtf document stream.charset - The charsetpublic void saveToFile(java.lang.String fileName)
saveToFile in interface IDocumentfileName - File name
public void saveToFile(java.lang.String fileName,
ToPdfParameterList paramList)
fileName - File nameparamList - Parameter list
public void saveToFile(java.lang.String fileName,
java.util.List embeddedFontNameList)
fileName - File nameembeddedFontNameList - Embedded font name list
public void saveToEpub(java.lang.String fileName,
DocPicture coverImage)
fileName - The file name.coverImage - The cover image.
public void saveToEpub(java.io.OutputStream stream,
DocPicture coverImage)
stream - The stream.coverImage - The cover image.
public void insertTextFromFile(java.lang.String fileName,
FileFormat fileFormat)
fileName - File namefileFormat - Type of the format
public void insertTextFromStream(java.io.InputStream stream,
FileFormat fileFormat)
stream - The stream.fileFormat - Type of the format
public void saveToFile(java.lang.String fileName,
FileFormat fileFormat)
saveToFile in interface IDocumentfileName - File namefileFormat - Type of the formatpublic void saveToSVG(java.lang.String fileName)
fileName - The file name.public java.util.List<byte[]> saveToSVG()
public void saveToStream(java.io.OutputStream stream,
ToPdfParameterList paramList)
stream - streamparamList - Embedded font name list
public void loadFromStream(java.io.InputStream stream,
FileFormat fileFormat,
XHTMLValidationType validationType)
stream - The stream.fileFormat - Type of the format.validationType - Type of the validation.
public void loadFromStream(java.io.InputStream stream,
FileFormat fileFormat)
loadFromStream in interface IDocumentstream - streamfileFormat - fileFormat
public void loadFromStream(java.io.InputStream stream,
FileFormat fileFormat,
java.lang.String password)
stream - The stream.fileFormat - Type of the format.password - The password.
public void saveToStream(java.io.OutputStream stream,
FileFormat fileFormat,
java.lang.String certificatePath,
java.lang.String securePassword)
stream - The stream.fileFormat - The file format.certificatePath - Path to the file certificatesecurePassword - Password of the certificate.
public void saveToStream(java.io.OutputStream stream,
FileFormat fileFormat,
byte[] certificateData,
java.lang.String securePassword)
stream - The stream.fileFormat - The file format.certificateData - The certificate data.securePassword - Password of the certificate.
public void saveToStream(com.spire.ms.System.IO.Stream stream,
FileFormat fileFormat,
byte[] certificateData,
java.lang.String securePassword)
stream - The stream.fileFormat - The file format.certificateData - The certificate data.securePassword - Password of the certificate.
public void saveToFile(java.lang.String fileName,
FileFormat fileFormat,
java.lang.String certificatePath,
java.lang.String securePassword)
fileName - The file.fileFormat - The file format.certificatePath - Path to the file certificatesecurePassword - Password of the certificate.
public void saveToFile(java.lang.String fileName,
FileFormat fileFormat,
byte[] certificateData,
java.lang.String securePassword)
fileName - The file.fileFormat - The file format.certificateData - The certificate data.securePassword - Password of the certificate.
public void saveToStream(java.io.OutputStream stream,
FileFormat fileFormat)
stream - The output streamfileFormat - The file format
public void saveToFile(java.io.OutputStream stream,
FileFormat fileFormat)
saveToFile in interface IDocumentstream - The output streamfileFormat - The file formatpublic void close()
public void dispose()
public java.awt.image.BufferedImage[] saveToImages(ImageType type)
saveToImages in interface IDocumenttype - The ImageType
public java.awt.image.BufferedImage saveToImages(int pageIndex,
ImageType type)
saveToImages in interface IDocumentpageIndex - Zero based page indextype - The ImageType
public java.awt.image.BufferedImage[] saveToImages(int pageIndex,
int pageCount,
ImageType type)
saveToImages in interface IDocumentpageIndex - Starting page index (Zero based)pageCount - Number of pagestype - The ImageType
public TextSelection findPattern(java.util.regex.Pattern pattern)
findPattern in interface IDocumentpattern - regex pattern
public TextSelection[] findPatternInLine(java.util.regex.Pattern pattern)
findPatternInLine in interface IDocumentpattern - The pattern.
public TextSelection findString(java.lang.String stringValue,
boolean caseSensitive,
boolean wholeWord)
findString in interface IDocumentstringValue - stringValuecaseSensitive - caseSensitivewholeWord - wholeWord
public TextSelection[] findStringInLine(java.lang.String given,
boolean caseSensitive,
boolean wholeWord)
findStringInLine in interface IDocumentgiven - The string to find.caseSensitive - if it specifies case sensitive, set to truewholeWord - if it specifies to search a whole word, set to true
public TextSelection[] findAllPattern(java.util.regex.Pattern pattern)
findAllPattern in interface IDocumentpattern - The pattern
public TextSelection[] findAllString(java.lang.String matchString,
boolean caseSensitive,
boolean wholeWord)
findAllString in interface IDocumentmatchString - matchStringcaseSensitive - caseSensitivewholeWord - wholeWord
public int replace(java.util.regex.Pattern pattern,
java.lang.String replace)
replace in interface IDocumentpattern - patternreplace - replace
public int replace(java.lang.String matchString,
java.lang.String newValue,
boolean caseSensitive,
boolean wholeWord)
replace in interface IDocumentmatchString - The match stringnewValue - The new valuecaseSensitive - Is case sensitive or NOTwholeWord - Is whole word or NOt
public int replace(java.lang.String matchString,
TextSelection textSelection,
boolean caseSensitive,
boolean wholeWord)
replace in interface IDocumentmatchString - The matchString.textSelection - The text selection.caseSensitive - if it specifies case sensitive, set to truewholeWord - if it specifies to search whole word, set to true
public int replace(java.util.regex.Pattern pattern,
TextSelection textSelection)
replace in interface IDocumentpattern - The pattern.textSelection - The text selection.
public int replace(java.lang.String matchString,
IDocument matchDoc,
boolean caseSensitive,
boolean wholeWord)
matchString - The matchString.matchDoc - The newValue doc.caseSensitive - if it is case sensitive, set to truewholeWord - if specifies whole word,set to true
public void updateWordCount()
updateWordCount in interface IDocumentpublic void updateWordCount(char[] splitchar)
splitchar - The word separator.
public void updateWordCount(char[] splitchar,
boolean includeTbFnEn)
splitchar - The word separator.includeTbFnEn - The include text boxes,footnotes and endnotes.public int getPageCountEx()
public void updateTableOfContents()
public void updateTableOfContents(TableOfContent toc)
public int replaceInLine(java.lang.String matchString,
java.lang.String newValue,
boolean caseSensitive,
boolean wholeWord)
replaceInLine in interface IDocumentmatchString - The matchString.newValue - The newValue.caseSensitive - if it specifies case sensitive, set to truewholeWord - if it specifies whole word to be newValue, set to true
public int replaceInLine(java.util.regex.Pattern pattern,
java.lang.String newValue)
replaceInLine in interface IDocumentpattern - The pattern.newValue - The newValue.
public int replaceInLine(java.lang.String matchString,
TextSelection matchSelection,
boolean caseSensitive,
boolean wholeWord)
replaceInLine in interface IDocumentmatchString - The matchString.matchSelection - The matchSelection.caseSensitive - if it specifies case sensitive newValue, set to truewholeWord - if it specifies whole word to be newValue, set to true
public int replaceInLine(java.util.regex.Pattern pattern,
TextSelection matchSelection)
replaceInLine in interface IDocumentpattern - The pattern.matchSelection - The matchSelection.
public TextSelection findString(BodyRegion start,
java.lang.String matchString,
boolean caseSensitive,
boolean wholeWord)
findString in interface IDocumentstart - Search starts.matchString - The string to find.caseSensitive - if it specifies case sensitive search, set to truewholeWord - if it specifies whole word to be search, set to true
public TextSelection findPattern(BodyRegion start,
java.util.regex.Pattern pattern)
findPattern in interface IDocumentstart - Search startspattern - The pattern.
public TextSelection[] findStringInLine(BodyRegion start,
java.lang.String matchString,
boolean caseSensitive,
boolean wholeWord)
findStringInLine in interface IDocumentstart - Search start.matchString - The matchString.caseSensitive - if it specifies case sensitive search, set to truewholeWord - if it specifies whole word to be search, set to true
public TextSelection[] findPatternInLine(BodyRegion start,
java.util.regex.Pattern pattern)
findPatternInLine in interface IDocumentstart - Search start.pattern - The pattern.
public void resetFindState()
resetFindState in interface IDocumentpublic ParagraphBase createParagraphItem(ParagraphItemType itemType)
itemType - Paragraph item type
public void clearMacros()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||