|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.viewer.CMBDocument
CMBDocument represents a document parsed by CMBDocumentServices. Properties are provided to query and control general aspects of the document, such as the number of pages and scale. An array property provides access to CMBPage objects which represent the pages of the document.
There is no public constructor for CMBDocument. Use CMBDocumentServices.loadDocument()
to obtain an instance of CMBDocument.
Fields inherited from interface com.ibm.mm.viewer.CMBViewerConstants |
DEFAULT_PAGE_NUMBER, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90 |
Method Summary | |
boolean |
getCanEnhance()
Returns true if the document can be enhanced. |
boolean |
getCanInvert()
Returns true if the document pages can be color-inverted. |
boolean |
getCanPaginate()
Returns true if individual pages of the document can be obtained. |
boolean |
getCanPrint()
Returns true if the document can be printed using print(). |
boolean |
getCanRotate()
Returns true if the document can be rotated. |
boolean |
getCanShowAnnotations()
Returns true if annotations stored with the document can be displayed on the document pages. |
boolean |
getCanWrite()
Returns true if the document can be written in one of the preferred formats or if the document can be written in its original format. |
boolean |
getEnhance()
Returns the current enhance of the document. |
int |
getImageResolution()
Returns the image resolution of the document in pixels per inch (ppi). |
boolean |
getInvert()
Returns the current invert setting of the document. |
java.lang.String |
getMimeType()
Returns the MIME content type of the document. |
int |
getPageCount()
Returns the number of pages in the document. |
CMBPage[] |
getPages()
Returns an array of CMBPage objects for all pages of the document. |
CMBPage |
getPages(int index)
Returns a CMBPage object for a particular page of the document. |
double |
getPreferredScale()
Returns the preferred scale for pages of the document. |
int |
getRotation()
Returns the current rotation of the document. |
boolean |
getShowAnnotations()
Returns the current setting for annotations. |
java.lang.String |
getWriteMimeType()
Return the Mime type for the format that the document will be written when using CMBDocument.write. |
void |
print(java.awt.PrintJob printJob,
boolean withAnnotations)
Print the document (all pages). |
void |
setEnhance(boolean enhance)
Set the enhance of the document |
void |
setInvert(boolean invert)
Sets the invert of the document. |
void |
setPreferredScale(double scale)
Sets the preferred scale for pages of the document. |
void |
setRotation(int rotation)
Sets the rotation of the document. |
void |
setShowAnnotations(boolean withAnnotations)
Sets annotations showing. |
void |
write(java.io.OutputStream outStream)
Writes the document to the output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.String getMimeType()
public boolean getCanPaginate()
public int getPageCount() throws java.io.IOException
Note: For large documents, calling this method may require that all parts of the document be retrieved from the server and processed, which could be time consuming.
public CMBPage[] getPages() throws java.io.IOException
Note: For large documents, calling this method may require that all parts of the document be retrieved from the server and processed, which could be time consuming.
public CMBPage getPages(int index) throws java.lang.ArrayIndexOutOfBoundsException, java.io.IOException
index
- the index of the page (zero is the first page).java.lang.ArrayIndexOutOfBoundsException
- if the index is not a valid index of a page.public double getPreferredScale()
public void setPreferredScale(double scale)
scale
- the new preferred scale.public boolean getCanRotate()
public int getRotation()
public void setRotation(int rotation)
rotation
- one of four values: ROTATE_0, ROTATE_90, ROTATE_180, or ROTATE_270.public boolean getCanEnhance()
public boolean getEnhance()
public void setEnhance(boolean enhance)
enhance
- if true, the document is enhancedpublic boolean getCanInvert()
public boolean getInvert()
public void setInvert(boolean invert)
invert
- if true, the document is color-inverted.public boolean getCanShowAnnotations()
public boolean getShowAnnotations()
public void setShowAnnotations(boolean withAnnotations)
withAnnotations
- If true, annotations stored with the document will be displayed on
the pages of the document.public boolean getCanPrint()
public java.lang.String getWriteMimeType()
public int getImageResolution()
public void print(java.awt.PrintJob printJob, boolean withAnnotations) throws CMBDocumentEngineException, java.io.IOException
Note: Print is only supported for documents whose pages can be displayed as Java images by the underlying document engines.
printJob
- the document pages are printed to this print job. The
print job is not closed, so the caller should close the print job
using PrintJob.end().withAnnotations
- if true, the annotations are also printed.public boolean getCanWrite()
public void write(java.io.OutputStream outStream) throws CMBDocumentEngineException, java.io.IOException
outStream
- the output stream where the document is written.
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |