public interface IPDFDocument extends Printable
Modifier and Type | Field and Description |
---|---|
static String |
MAGNIFICATION_FIT_ACTUAL |
static String |
MAGNIFICATION_FIT_HEIGHT |
static String |
MAGNIFICATION_FIT_PAGE |
static String |
MAGNIFICATION_FIT_VISIBLE |
static String |
MAGNIFICATION_FIT_WIDTH |
static String |
PAGELAYOUT_ONECOLUMN |
static String |
PAGELAYOUT_SINGLEPAGE |
static String |
PAGELAYOUT_TWOCOLUMNLEFT |
static String |
PAGELAYOUT_TWOCOLUMNRIGHT |
static String |
PAGELAYOUT_TWOPAGELEFT |
static String |
PAGELAYOUT_TWOPAGERIGHT |
static String |
PAGEMODE_FULLSCREEN |
static String |
PAGEMODE_USEATTACHMENTS |
static String |
PAGEMODE_USENONE |
static String |
PAGEMODE_USEOC |
static String |
PAGEMODE_USEOUTLINES |
static String |
PAGEMODE_USETHUMBS |
NO_SUCH_PAGE, PAGE_EXISTS
Modifier and Type | Method and Description |
---|---|
void |
addDocumentListener(IDocumentListener listener)
Internal method to keep track of document events.
|
void |
addPrintListener(PrintListener printListener)
Adds a
PrintListener to the PDFDocument |
void |
close()
Close / release all resources held by this document.
|
boolean |
containsJavaScript()
Deprecated.
Do not use this method as it is unreliable. This method returns true only after JavaScript has been encountered, so a false negative is possible.
|
AcroForm |
getAcroForm()
Returns the AcroForm in this document.
|
Vector<String> |
getDestinationNames()
Get a vector of strings that are the names of named destinations.
|
DocumentInfo |
getDocumentInfo()
Returns a DocumentInfo object containing the PDF standard document info
if present.
|
DocumentViewPrefs |
getDocumentViewPrefs()
Returns a DocumentViewPrefs object containing information about the
way the document is to be presented on the screen or in print.
|
Vector<IEmbeddedFile> |
getEmbeddedFiles()
Returns a list of embedded files, if any, in the document.
|
String |
getFileModifiedID()
Return the PDF document's modified ID.
|
String |
getFileOriginalID()
Return the PDF document's original ID.
|
IPDFPage |
getIPage(int pageIndex)
Returns an object that implements IPDFPage given the page number.
|
Layer |
getLayer(int layerIndex)
Returns a particular PDF layer given its index.
|
int |
getLayerCount()
Returns the number of PDF layers in this document.
|
String |
getLinearizationVersionNumber()
Returns the linearization version number.
|
String |
getMagnification()
Deprecated.
Use getOpenAction()
|
Action |
getOpenAction()
Returns the list of actions to run when the document is opened.
|
Pageable |
getPageable(PrinterJob pJob)
Returns an object that implements Pageable for this PDF document.
|
int |
getPageCount()
Returns the number of pages in this document.
|
String |
getPageLayout()
Returns the value of the page layout key for this document.
|
String |
getPageMode()
Returns the value of the page mode viewer preference in the document.
|
AllPDFPermissions |
getPDFPermissions()
Returns the AllPDFPermissions object for this document.
|
PDFSource |
getPDFSource()
Returns an object representing the source of the PDF content.
|
List<PrintListener> |
getPrintListeners()
Returns any print listeners that are registered with this document.
|
PrintSettings |
getPrintSettings()
Get the current PrintSettings object.
|
Bookmark |
getRootBookmark()
Returns the bookmark tree for this document.
|
String |
getText()
Returns the text content of the entire document, as a
String |
String |
getText(int pageIndex)
Returns the text content of this page as a
String . |
IWatermark |
getWatermark()
Returns the watermark for the PDF document.
|
boolean |
isLinearized()
Returns true if document is formatted for Fast Web View.
|
void |
print(PrintSettings printSettings)
Prints this PDF document.
|
void |
removeDocumentListener(IDocumentListener listener)
Internal method to keep track of document events.
|
void |
removePrintListener(PrintListener printListener)
Removes a
PrintListener from the PDFDocument |
void |
setPrintSettings(PrintSettings printSettings)
Set the PrintSettings to be used on the next printout.
|
void |
setWatermark(IWatermark watermark)
Sets the watermark on the PDF document.
|
static final String MAGNIFICATION_FIT_WIDTH
static final String MAGNIFICATION_FIT_VISIBLE
static final String MAGNIFICATION_FIT_HEIGHT
static final String MAGNIFICATION_FIT_PAGE
static final String MAGNIFICATION_FIT_ACTUAL
static final String PAGEMODE_USENONE
static final String PAGEMODE_USEOUTLINES
static final String PAGEMODE_USETHUMBS
static final String PAGEMODE_FULLSCREEN
static final String PAGEMODE_USEOC
static final String PAGEMODE_USEATTACHMENTS
static final String PAGELAYOUT_SINGLEPAGE
static final String PAGELAYOUT_ONECOLUMN
static final String PAGELAYOUT_TWOCOLUMNLEFT
static final String PAGELAYOUT_TWOPAGELEFT
static final String PAGELAYOUT_TWOPAGERIGHT
static final String PAGELAYOUT_TWOCOLUMNRIGHT
int getPageCount()
String getPageMode()
AllPDFPermissions getPDFPermissions()
String getMagnification()
String getPageLayout()
IPDFPage getIPage(int pageIndex)
pageIndex
- Index of the page to return.String getLinearizationVersionNumber()
boolean isLinearized()
int getLayerCount()
Layer getLayer(int layerIndex)
void addDocumentListener(IDocumentListener listener)
void removeDocumentListener(IDocumentListener listener)
void print(PrintSettings printSettings) throws PDFPermissionException, PrinterException
printSettings
- Print job settings. Use this object to tell jPDFProcess how to
print the document. If null, the library will print using
default settings.PDFPermissionException
PrinterException
Vector<IEmbeddedFile> getEmbeddedFiles()
void addPrintListener(PrintListener printListener)
PrintListener
to the PDFDocumentprintListener
- - the PrintListener
to be addedvoid removePrintListener(PrintListener printListener)
PrintListener
from the PDFDocumentprintListener
- - the PrintListener
to be removedList<PrintListener> getPrintListeners()
PDFSource getPDFSource()
String getFileOriginalID()
String getFileModifiedID()
DocumentInfo getDocumentInfo()
DocumentViewPrefs getDocumentViewPrefs()
Bookmark getRootBookmark()
PrintSettings getPrintSettings()
void setPrintSettings(PrintSettings printSettings)
printSettings
- Settings to use on the next printout.AcroForm getAcroForm()
Pageable getPageable(PrinterJob pJob)
pJob
- PrinterJob object where the Pageable will be used.String getText() throws PDFException
String
PDFException
String getText(int pageIndex) throws PDFException
String
.pageIndex
- The index of the page to get the text for.PDFException
Action getOpenAction()
void setWatermark(IWatermark watermark)
IWatermark.TYPE_IMAGES
,
IWatermark.TYPE_PRINT
, IWatermark.TYPE_VIEWER
when creating images, printing, and viewing the PDF document,
respectively.watermark
- the IWatermark
object to use when creating
images, printing, and viewing the PDF documentIWatermark getWatermark()
IWatermark
objectsetWatermark(com.qoppa.pdf.IWatermark)
boolean containsJavaScript()
void close()
Vector<String> getDestinationNames() throws PDFException
PDFException