|
|||||||||
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 |
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 idocument
public void settoc(tableofcontent value)
settoc
in interface idocument
value
- 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 idocumentobject
getdocumentobjecttype
in class documentobject
public builtindocumentproperties getbuiltindocumentproperties()
getbuiltindocumentproperties
in interface idocument
public customdocumentproperties getcustomdocumentproperties()
getcustomdocumentproperties
in interface idocument
public sectioncollection getsections()
getsections
in interface idocument
public stylecollection getstyles()
getstyles
in interface idocument
public liststylecollection getliststyles()
getliststyles
in interface idocument
public bookmarkcollection getbookmarks()
getbookmarks
in interface idocument
public fieldcollection getfields()
public commentscollection getcomments()
getcomments
in interface idocument
public textboxcollection gettextboxes()
gettextboxes
in interface idocument
public void settextboxes(textboxcollection value)
value
- textboxcollectionpublic section getlastsection()
getlastsection
in interface idocument
public paragraph getlastparagraph()
getlastparagraph
in interface idocument
public footendnoteoptions getendnoteoptions()
public footendnoteoptions getfootnoteoptions()
public watermarkbase getwatermark()
getwatermark
in interface idocument
public void setwatermark(watermarkbase value)
setwatermark
in interface idocument
value
- watermarkbasepublic background getbackground()
getbackground
in interface idocument
public mailmerge getmailmerge()
getmailmerge
in interface idocument
public protectiontype getprotectiontype()
getprotectiontype
in interface idocument
public void setprotectiontype(protectiontype value)
setprotectiontype
in interface idocument
value
- protectiontypepublic viewsetup getviewsetup()
getviewsetup
in interface idocument
public boolean getquitemode()
public void setquitemode(boolean value)
value
- booleanpublic documentobjectcollection getchildobjects()
getchildobjects
in interface icompositeobject
getchildobjects
in class documentobject
public xhtmlvalidationtype getxhtmlvalidateoption()
public void setxhtmlvalidateoption(xhtmlvalidationtype value)
value
- the html validate option.public variablecollection getvariables()
getvariables
in interface idocument
public documentproperties getproperties()
getproperties
in interface idocument
public boolean haschanges()
haschanges
in interface idocument
public 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 idocument
public void isupdatefields(boolean value)
isupdatefields
in interface idocument
value
- 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 idocument
public void createminialdocument()
createminialdocument
in interface idocument
public section addsection()
addsection
in interface idocument
public paragraphstyle addparagraphstyle(java.lang.string stylename)
addparagraphstyle
in interface idocument
stylename
- paragraph style name
public liststyle addliststyle(listtype listtype, java.lang.string stylename)
addliststyle
in interface idocument
listtype
- 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 idocument
deepclone
in interface idocumentobject
deepclone
in class documentobject
public 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 idocument
doc
- the doc.public void importcontent(idocument doc, boolean importstyles)
importcontent
in interface idocument
doc
- 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 idocument
builtinstyle
- the built-in style.
public void acceptchanges()
public void rejectchanges()
public void protect(protectiontype type)
protect
in interface idocument
type
- the type of the protection.public void protect(protectiontype type, java.lang.string password)
protect
in interface idocument
type
- the type of the protectionpassword
- the password used for protection.public void encrypt(java.lang.string password)
encrypt
in interface idocument
password
- 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 idocument
filename
- file namepublic void loadfromfile(java.lang.string filename, fileformat fileformat)
loadfromfile
in interface idocument
filename
- 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 idocument
strfilename
- 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 charsetpublic 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 idocument
filename
- file namepublic void savetofile(java.lang.string filename, topdfparameterlist paramlist)
filename
- file nameparamlist
- parameter listpublic void savetofile(java.lang.string filename, java.util.list embeddedfontnamelist)
filename
- file nameembeddedfontnamelist
- embedded font name listpublic 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 formatpublic void inserttextfromstream(java.io.inputstream stream, fileformat fileformat)
stream
- the stream.fileformat
- type of the formatpublic void savetofile(java.lang.string filename, fileformat fileformat)
savetofile
in interface idocument
filename
- file namefileformat
- type of the formatpublic void savetosvg(java.lang.string filename)
filename
- the file name.public java.util.listsavetosvg()
public void savetostream(java.io.outputstream stream, topdfparameterlist paramlist)
stream
- streamparamlist
- embedded font name listpublic 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 idocument
stream
- streamfileformat
- fileformatpublic 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 formatpublic void savetofile(java.io.outputstream stream, fileformat fileformat)
savetofile
in interface idocument
stream
- the output streamfileformat
- the file formatpublic void close()
public void dispose()
public java.awt.image.bufferedimage[] savetoimages(imagetype type)
savetoimages
in interface idocument
type
- the imagetype
public java.awt.image.bufferedimage savetoimages(int pageindex, imagetype type)
savetoimages
in interface idocument
pageindex
- zero based page indextype
- the imagetype
public java.awt.image.bufferedimage[] savetoimages(int pageindex, int pagecount, imagetype type)
savetoimages
in interface idocument
pageindex
- starting page index (zero based)pagecount
- number of pagestype
- the imagetype
public textselection findpattern(java.util.regex.pattern pattern)
findpattern
in interface idocument
pattern
- regex pattern
public textselection[] findpatterninline(java.util.regex.pattern pattern)
findpatterninline
in interface idocument
pattern
- the pattern.
public textselection findstring(java.lang.string stringvalue, boolean casesensitive, boolean wholeword)
findstring
in interface idocument
stringvalue
- stringvaluecasesensitive
- casesensitivewholeword
- wholeword
public textselection[] findstringinline(java.lang.string given, boolean casesensitive, boolean wholeword)
findstringinline
in interface idocument
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
public textselection[] findallpattern(java.util.regex.pattern pattern)
findallpattern
in interface idocument
pattern
- the pattern
public textselection[] findallstring(java.lang.string matchstring, boolean casesensitive, boolean wholeword)
findallstring
in interface idocument
matchstring
- matchstringcasesensitive
- casesensitivewholeword
- wholeword
public int replace(java.util.regex.pattern pattern, java.lang.string replace)
replace
in interface idocument
pattern
- patternreplace
- replace
public int replace(java.lang.string matchstring, java.lang.string newvalue, boolean casesensitive, boolean wholeword)
replace
in interface idocument
matchstring
- 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 idocument
matchstring
- 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 idocument
pattern
- 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 idocument
public 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 idocument
matchstring
- 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 idocument
pattern
- the pattern.newvalue
- the newvalue.
public int replaceinline(java.lang.string matchstring, textselection matchselection, boolean casesensitive, boolean wholeword)
replaceinline
in interface idocument
matchstring
- 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 idocument
pattern
- the pattern.matchselection
- the matchselection.
public textselection findstring(bodyregion start, java.lang.string matchstring, boolean casesensitive, boolean wholeword)
findstring
in interface idocument
start
- 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 idocument
start
- search startspattern
- the pattern.
public textselection[] findstringinline(bodyregion start, java.lang.string matchstring, boolean casesensitive, boolean wholeword)
findstringinline
in interface idocument
start
- 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 idocument
start
- search start.pattern
- the pattern.
public void resetfindstate()
resetfindstate
in interface idocument
public 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 |