|
|||||||||
prev class next class | frames no frames | ||||||||
summary: nested | field | constr | method | detail: field | constr | method |
java.lang.objectcom.spire.pdf.pdfpagebase
public abstract class pdfpagebase
the base class for all pages.
constructor summary | |
---|---|
pdfpagebase( dic)
|
|
pdfpagebase( dic,
crosstable)
|
method summary | |
---|---|
pdftemplate |
createtemplate()
creates a template from page content and all annotation appearances. |
void |
deleteimage(int imageindex)
|
java.awt.image.bufferedimage[] |
extractimages()
extracts images from the given pdf page. |
java.awt.image.bufferedimage[] |
extractimages(boolean processimage)
extracts images from the given pdf page. |
java.lang.string |
extracttext()
extracts text from the given pdf page. |
java.lang.string |
extracttext(boolean keepwhitespace)
extracts text from the given pdf page. |
java.lang.string |
extracttext(boolean keepwhitespace,
boolean optimizingtextline)
extracts text from the given pdf page. |
java.lang.string |
extracttext(boolean keepwhitespace,
boolean optimizingtextline,
boolean optimizinggridtext)
extracts text from the given pdf page. |
java.lang.string |
extracttext(java.awt.geom.rectangle2d rectangele)
extracts text in the range of rectangle from the given pdf page. |
java.lang.string |
extracttext(java.awt.geom.rectangle2d rectangle,
simpletextextractionstrategy sim)
|
java.lang.string |
extracttext(simpletextextractionstrategy strategy)
extracts text from the given pdf page by simpletextextractionstrategy. |
pdftextfindcollection |
findalltext()
find all text and position. |
pdftextfindcollection |
findtext(java.lang.string searchpatterntext)
find text |
pdftextfindcollection |
findtext(java.lang.string searchpatterntext,
boolean issearchwholeword)
find text that intends to search and that indicate the expected result is the whole word or not, which means, if it is true, only the word is exactly the same with the searching word will be found;if it is false, any word including the searching word will be found. |
pdftextfindcollection |
findtext(java.lang.string searchpatterntext,
boolean issearchwholeword,
boolean ignorecase)
find text |
pdftextfindcollection |
findtext(java.lang.string searchpatterntext,
java.util.enumset<textfindparameter> parameter)
find text |
java.awt.geom.rectangle2d |
getactualbounds(boolean includemargins)
calculates actual bounds of the page. |
java.awt.geom.dimension2d |
getactualsize()
gets the actual size of the page. |
boolean |
getallowcontaintopdoctemplates()
gets the template that allow contain top doc templates. |
pdfannotationcollection |
getannotationswidget()
gets the field collection. |
java.awt.geom.rectangle2d |
getartbox()
returns page region containing content. |
float |
getbackgroudopacity()
gets the transparency to draw the image |
java.awt.color |
getbackgroundcolor()
gets page's background color. |
java.awt.image.bufferedimage |
getbackgroundimage()
gets page's background image. |
java.awt.geom.rectangle2d |
getbackgroundregion()
the position and size of the background |
java.awt.geom.rectangle2d |
getbleedbox()
returns page region after clipping. |
pdfcanvas |
getcanvas()
gets the graphics of the . |
java.awt.geom.dimension2d |
getclientsize()
returns a page size reduced by page margins and page template dimensions. |
java.awt.geom.rectangle2d |
getcropbox()
returns the visible region of the page. |
int |
getdefaultlayerindex()
gets index of the default layer. |
pdfimageinfo[] |
getimagesinfo()
gets the information about the extracted image. |
java.awt.geom.rectangle2d |
getmediabox()
returns page region mediabox. |
java.lang.string |
getpagelabel()
get the page label. |
pdfpagelayercollection |
getpagelayers()
gets the collection of the page's layers. |
pdfpagerotateangle |
getrotation()
|
pdfsection |
getsection()
gets the parent section of the page. |
java.awt.geom.rectangle2d |
gettrimbox()
returns page region after trimming. |
boolean |
isautoadjustcontent()
|
void |
isautoadjustcontent(boolean autoadjustcontent)
some document page content does no start with q and end with q,so need adjust content. |
boolean |
isblank()
returns page is blank flag for page's content. |
void |
releaseextactimageinfo()
|
void |
replaceimage(int imageindex,
pdfimage image)
replace the image at index's position. |
void |
setallowcontaintopdoctemplates(boolean value)
sets the template that allow contain top doc templates. |
void |
setannotationswidget(pdfannotationcollection value)
sets the field collection. |
void |
setbackgroudopacity(float value)
sets the transparency to draw the image |
void |
setbackgroundcolor(java.awt.color value)
|
void |
setbackgroundimage(java.awt.image.bufferedimage value)
sets page's background color. |
void |
setbackgroundimage(java.lang.string imagefilename)
|
void |
setbackgroundregion(java.awt.geom.rectangle2d value)
|
void |
setdefaultlayerindex(int value)
sets index of the default layer. |
void |
setrotation(pdfpagerotateangle rotateangle)
sets the page rotation. |
void |
settaborder(taborder taborder)
set tab order. |
boolean |
trycompressimage(int imgindex)
try to compress images(except inline image). |
constructor detail |
---|
public pdfpagebase( dic, crosstable)
public pdfpagebase( dic)
method detail |
---|
public void isautoadjustcontent(boolean autoadjustcontent)
autoadjustcontent
- public boolean isautoadjustcontent()
public boolean isblank()
public java.awt.geom.rectangle2d getcropbox()
public java.awt.geom.rectangle2d getbleedbox()
public boolean getallowcontaintopdoctemplates()
public void setallowcontaintopdoctemplates(boolean value)
public java.awt.geom.rectangle2d getmediabox()
public java.awt.geom.rectangle2d gettrimbox()
public java.awt.geom.rectangle2d getartbox()
public pdfannotationcollection getannotationswidget()
public void setannotationswidget(pdfannotationcollection value)
public pdfimageinfo[] getimagesinfo()
com.spire.ms.system.exception
public pdfcanvas getcanvas()
public pdfsection getsection()
public pdfpagelayercollection getpagelayers()
public int getdefaultlayerindex()
public void setdefaultlayerindex(int value)
public java.awt.geom.dimension2d getactualsize()
public pdfpagerotateangle getrotation()
public void setrotation(pdfpagerotateangle rotateangle)
rotateangle
- public java.awt.image.bufferedimage getbackgroundimage()
public void setbackgroundimage(java.awt.image.bufferedimage value)
public void setbackgroundimage(java.lang.string imagefilename)
public java.awt.color getbackgroundcolor()
public void setbackgroundcolor(java.awt.color value)
public float getbackgroudopacity()
public void setbackgroudopacity(float value)
public java.awt.geom.rectangle2d getbackgroundregion()
public void setbackgroundregion(java.awt.geom.rectangle2d value)
public java.lang.string getpagelabel()
com.spire.ms.system.exception
public java.awt.geom.dimension2d getclientsize()
it's the actual size of the page where some output can be performed.
public java.awt.geom.rectangle2d getactualbounds(boolean includemargins)
includemargins
- if true - take into consideration margins.
public void replaceimage(int imageindex, pdfimage image)
imageindex
- index of an imageimage
- the new replace imagepublic pdftemplate createtemplate()
public pdftextfindcollection findtext(java.lang.string searchpatterntext, boolean issearchwholeword)
searchpatterntext
- issearchwholeword
-
com.spire.ms.system.exception
public pdftextfindcollection findtext(java.lang.string searchpatterntext)
searchpatterntext
- string searchpatterntext
public pdftextfindcollection findtext(java.lang.string searchpatterntext, boolean issearchwholeword, boolean ignorecase)
searchpatterntext
- issearchwholeword
- ignorecase
-
com.spire.ms.system.exception
public pdftextfindcollection findtext(java.lang.string searchpatterntext, java.util.enumset<textfindparameter> parameter)
searchpatterntext
- the text intends to search.parameter
- contains four elements: none, ignorecase, wholeword, and crossline.
four elements can be combined at will. such as: textfindparameter.crossline | textfindparameter.wholeword | textfindparameter.ignorecase.
public pdftextfindcollection findalltext()
com.spire.ms.system.exception
public java.lang.string extracttext()
public java.lang.string extracttext(simpletextextractionstrategy strategy)
strategy
-
public java.lang.string extracttext(java.awt.geom.rectangle2d rectangele)
rectangele
-
com.spire.ms.system.exception
public java.lang.string extracttext(java.awt.geom.rectangle2d rectangle, simpletextextractionstrategy sim)
public java.lang.string extracttext(boolean keepwhitespace)
keepwhitespace
- a bool value indicate weather keep original white spaces.in addition, pictures in original pdf
will be treated as white spaces. if keep white space ,the layout will be more similar to original pdf document.
public java.lang.string extracttext(boolean keepwhitespace, boolean optimizingtextline)
keepwhitespace
- a bool value indicate weather keep original white spaces.in addition, pictures in original pdf
will be treated as white spaces. if keep white space ,the layout will be more similar to original pdf document.optimizingtextline
- if a line sandwiched between two adjacent lines,try merging.default false.
public java.lang.string extracttext(boolean keepwhitespace, boolean optimizingtextline, boolean optimizinggridtext)
keepwhitespace
- a bool value indicate weather keep original white spaces.in addition, pictures in original pdf
will be treated as white spaces. if keep white space ,the layout will be more similar to original pdf document.optimizingtextline
- if a line sandwiched between two adjacent lines,try merging.default false.optimizinggridtext
- customized client function.in grid area,
content text top align and remove middle blank line.
each area split by blank line. default false.
public java.awt.image.bufferedimage[] extractimages()
public void releaseextactimageinfo()
public java.awt.image.bufferedimage[] extractimages(boolean processimage)
public void deleteimage(int imageindex)
public boolean trycompressimage(int imgindex)
imgindex
- the image index
com.spire.ms.system.exception
public void settaborder(taborder taborder)
taborder
- the order name
|
|||||||||
prev class next class | frames no frames | ||||||||
summary: nested | field | constr | method | detail: field | constr | method |