|
|||||||||
prev class next class | frames no frames | ||||||||
summary: nested | field | constr | method | detail: field | constr | method |
public interface idocument
represents the ms word document.
method summary | |
---|---|
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 document. |
section |
addsection()
adds new section to document. |
style |
addstyle(builtinstyle builtinstyle)
adds the style to the document style. |
void |
createminialdocument()
if the document contains no sections, creates one section with one paragraph. |
paragraph |
createparagraph()
creates the paragraph. |
document |
deepclone()
make deep copy of word document. |
void |
encrypt(java.lang.string password)
encrypts the document. |
textselection[] |
findallpattern(java.util.regex.pattern pattern)
finds and returns all entries of specified regular expression along with formatting. |
textselection[] |
findallstring(java.lang.string given,
boolean casesensitive,
boolean wholeword)
finds and returns all entries of specified string along with formatting, taking into consideration casesensitive and wholeword options. |
textselection |
findpattern(bodyregion startbodyitem,
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 startbodyitem,
java.util.regex.pattern pattern)
finds the next text which fit the specified pattern starting from start bodyregion using single-line mode. |
textselection[] |
findpatterninline(java.util.regex.pattern pattern)
finds the first entry of specified pattern in single-line mode. |
textselection |
findstring(bodyregion starttextbodyitem,
java.lang.string given,
boolean casesensitive,
boolean wholeword)
finds the next entry of matchstring string, taking into consideration casesensitive and wholeword options. |
textselection |
findstring(java.lang.string given,
boolean casesensitive,
boolean wholeword)
finds and returns entry of specified string along with formatting, taking into consideration casesensitive and wholeword options. |
textselection[] |
findstringinline(bodyregion starttextbodyitem,
java.lang.string given,
boolean casesensitive,
boolean wholeword)
finds the next matchstring text starting from specified. |
textselection[] |
findstringinline(java.lang.string given,
boolean casesensitive,
boolean wholeword)
finds the first entry of matchstring text in single-line mode. |
background |
getbackground()
gets background for the document. |
bookmarkcollection |
getbookmarks()
gets collection of bookmarks of the document |
builtindocumentproperties |
getbuiltindocumentproperties()
gets document's built-in properties. |
commentscollection |
getcomments()
gets collection of comments of the document. |
customdocumentproperties |
getcustomdocumentproperties()
gets document's custom properties. |
paragraph |
getlastparagraph()
gets the last paragraph. |
section |
getlastsection()
gets last section object. |
liststylecollection |
getliststyles()
gets collection of list styles. |
mailmerge |
getmailmerge()
gets mail merge engine. |
documentproperties |
getproperties()
gets the document properties. |
protectiontype |
getprotectiontype()
gets the type of protection of the document. |
sectioncollection |
getsections()
gets collection of sections of this document. |
stylecollection |
getstyles()
gets collection of styles. |
java.lang.string |
gettext()
gets the document's text. |
textboxcollection |
gettextboxes()
gets the textboxes of the document. |
tableofcontent |
gettoc()
gets the toc element of the document. |
variablecollection |
getvariables()
gets the document variables. |
viewsetup |
getviewsetup()
returns type in msword. |
watermarkbase |
getwatermark()
gets watermark for the document. |
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. |
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 the document from file in microsoft word format. |
void |
loadfromfile(java.lang.string filename,
fileformat fileformat)
opens the document from file in xml or microsoft word format. |
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 |
protect(protectiontype type)
protects the document. |
void |
protect(protectiontype type,
java.lang.string password)
protects the document. |
void |
removeencryption()
removes the encryption. |
int |
replace(java.util.regex.pattern pattern,
java.lang.string replace)
replaces all occurrences of a character pattern specified by a 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 given,
java.lang.string replace,
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 given,
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 replace)
replaces all entries with specified pattern with newvalue text in single-line mode. |
int |
replaceinline(java.util.regex.pattern pattern,
textselection replacement)
replaces the matchstring pattern with matchselection in single-line mode. |
int |
replaceinline(java.lang.string given,
java.lang.string replace,
boolean casesensitive,
boolean wholeword)
replaces all entries of matchstring text with newvalue text in single-line mode. |
int |
replaceinline(java.lang.string given,
textselection replacement,
boolean casesensitive,
boolean wholeword)
replaces the matchstring text with matchselection in single-line mode. |
void |
resetfindstate()
resets the findpattern. |
void |
savetofile(java.io.outputstream stream,
fileformat fileformat)
saves the document to a stream in xml or microsoft word format. |
void |
savetofile(java.lang.string filename)
saves the document 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. |
java.awt.image.bufferedimage[] |
savetoimages(imagetype type)
converts the whole document into images layouting of the pages is not exactly the same as the layouting made by microsoft word. |
java.awt.image.bufferedimage |
savetoimages(int pageindex,
imagetype type)
converts the specified page into image. |
java.awt.image.bufferedimage[] |
savetoimages(int pageindex,
int noofpages,
imagetype type)
converts the specified range of pages into images layouting of the pages is not exactly the same as the layouting made by ms-word. |
void |
setprotectiontype(protectiontype value)
sets the type of protection of the document. |
void |
settoc(tableofcontent value)
sets the toc element of the document. |
void |
setwatermark(watermarkbase value)
sets watermark for the document. |
void |
updatewordcount()
update paragraphs count, word count and character count |
methods inherited from interface com.spire.doc.interfaces.icompositeobject |
---|
getchildobjects |
methods inherited from interface com.spire.doc.interfaces.idocumentobject |
---|
getdocument, getdocumentobjecttype, getnextsibling, getowner, getprevioussibling, iscomposite |
method detail |
---|
builtindocumentproperties getbuiltindocumentproperties()
customdocumentproperties getcustomdocumentproperties()
sectioncollection getsections()
stylecollection getstyles()
liststylecollection getliststyles()
bookmarkcollection getbookmarks()
textboxcollection gettextboxes()
tableofcontent gettoc()
void settoc(tableofcontent value)
value
- tableofcontentcommentscollection getcomments()
section getlastsection()
paragraph getlastparagraph()
protectiontype getprotectiontype()
void setprotectiontype(protectiontype value)
value
- protectiontypeviewsetup getviewsetup()
watermarkbase getwatermark()
void setwatermark(watermarkbase value)
value
- watermarkbasemailmerge getmailmerge()
background getbackground()
variablecollection getvariables()
documentproperties getproperties()
boolean haschanges()
boolean isupdatefields()
void isupdatefields(boolean value)
value
- if update fields, set to truevoid createminialdocument()
section addsection()
paragraphstyle addparagraphstyle(java.lang.string stylename)
stylename
- paragraph style name
liststyle addliststyle(listtype listtype, java.lang.string stylename)
listtype
- type of the list style.stylename
- list style name
java.lang.string gettext()
java.awt.image.bufferedimage[] savetoimages(imagetype type)
type
- the imagetype
java.awt.image.bufferedimage savetoimages(int pageindex, imagetype type)
pageindex
- zero based page indextype
- the imagetype
java.awt.image.bufferedimage[] savetoimages(int pageindex, int noofpages, imagetype type)
pageindex
- starting page index (zero based)noofpages
- number of pagestype
- the imagetype
paragraph createparagraph()
document deepclone()
deepclone
in interface idocumentobject
style addstyle(builtinstyle builtinstyle)
builtinstyle
- the built-in style.
void protect(protectiontype type)
type
- the type of the protection.void protect(protectiontype type, java.lang.string password)
type
- the type of the protectionpassword
- the password used for protection.void encrypt(java.lang.string password)
password
- the passwordvoid removeencryption()
void updatewordcount()
textselection findpattern(java.util.regex.pattern pattern)
pattern
- pattern
textselection findstring(java.lang.string given, boolean casesensitive, boolean wholeword)
given
- givencasesensitive
- casesensitivewholeword
- wholeword
textselection[] findpatterninline(java.util.regex.pattern pattern)
pattern
- the pattern.
textselection[] findstringinline(java.lang.string given, boolean casesensitive, boolean wholeword)
given
- the string to find.casesensitive
- if it specifies case sensitive, set to truewholeword
- if it specifies to search a whole word, set to true
textselection[] findallpattern(java.util.regex.pattern pattern)
pattern
- pattern
textselection[] findallstring(java.lang.string given, boolean casesensitive, boolean wholeword)
given
- givencasesensitive
- casesensitivewholeword
- wholeword
int replace(java.util.regex.pattern pattern, java.lang.string replace)
pattern
- patternreplace
- replace
int replace(java.lang.string given, java.lang.string replace, boolean casesensitive, boolean wholeword)
given
- givenreplace
- replacecasesensitive
- casesensitivewholeword
- wholeword
int replace(java.util.regex.pattern pattern, textselection textselection)
pattern
- the pattern.textselection
- the text selection.
int replace(java.lang.string given, textselection textselection, boolean casesensitive, boolean wholeword)
given
- 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
int replaceinline(java.lang.string given, java.lang.string replace, boolean casesensitive, boolean wholeword)
given
- the matchstring.replace
- the newvalue.casesensitive
- if it specifies case sensitive, set to truewholeword
- if it specifies whole word to be newvalue, set to true
int replaceinline(java.util.regex.pattern pattern, java.lang.string replace)
pattern
- the pattern.replace
- the newvalue.
int replaceinline(java.lang.string given, textselection replacement, boolean casesensitive, boolean wholeword)
given
- the matchstring.replacement
- the matchselection.casesensitive
- if it specifies case sensitive newvalue, set to truewholeword
- if it specifies whole word to be newvalue, set to true
int replaceinline(java.util.regex.pattern pattern, textselection replacement)
pattern
- the pattern.replacement
- the matchselection.
textselection findstring(bodyregion starttextbodyitem, java.lang.string given, boolean casesensitive, boolean wholeword)
starttextbodyitem
- the text body item at which search starts (paragraph or table)given
- 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
textselection findpattern(bodyregion startbodyitem, java.util.regex.pattern pattern)
startbodyitem
- the start body item at which search starts (paragraph or table).pattern
- the pattern.
textselection[] findstringinline(bodyregion starttextbodyitem, java.lang.string given, boolean casesensitive, boolean wholeword)
starttextbodyitem
- the start text body item.given
- the matchstring.casesensitive
- if it specifies case sensitive search, set to truewholeword
- if it specifies whole word to be search, set to true
textselection[] findpatterninline(bodyregion startbodyitem, java.util.regex.pattern pattern)
startbodyitem
- the start body item.pattern
- the pattern.
void resetfindstate()
void loadfromstream(java.io.inputstream stream, fileformat fileformat)
stream
- the input streamfileformat
- the file formatvoid savetofile(java.io.outputstream stream, fileformat fileformat)
stream
- the output streamfileformat
- the file formatvoid loadfromfile(java.lang.string filename)
filename
- file namevoid loadfromfile(java.lang.string filename, fileformat fileformat)
filename
- filenamefileformat
- fileformatvoid loadfromfileinreadmode(java.lang.string strfilename, fileformat fileformat)
strfilename
- file to open.fileformat
- type of the format.void savetofile(java.lang.string filename)
filename
- file namevoid savetofile(java.lang.string filename, fileformat fileformat)
filename
- file namefileformat
- type of the formatvoid importcontent(idocument doc)
doc
- the doc.void importcontent(idocument doc, boolean importstyles)
doc
- the doc.importstyles
- if the document styles which have same names will be
also imported to the destination document, set to true
|
|||||||||
prev class next class | frames no frames | ||||||||
summary: nested | field | constr | method | detail: field | constr | method |