java.lang.Object | |
↳ | com.pdftron.pdf.Print |
Print is a utility class that can be used to print PDF documents. It is only supported on Android 4.4 and up (API Level 19+).
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | Print.Compat | Compatibility layer for older API. | |||||||||
interface | Print.PrintCallback | PrintCallback interface provides a way for users to receive callback when print job is finished. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | PRINT_CONTENT_ANNOTATION_BIT | ||||||||||
int | PRINT_CONTENT_DOCUMENT_BIT | ||||||||||
int | PRINT_CONTENT_SUMMARY_BIT |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Print() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static void |
addPrintListener(Print.PrintCallback listener)
Add a listener that will be invoked by
Print.PrintCallback . | ||||||||||
static void |
clearPrintListeners()
Remove all listeners that are notified of any callback from PrintCallback.
| ||||||||||
static PDFDoc |
exportAnnotations(PDFDoc inputDoc, boolean isRtl)
Export comments and summary of annotations
| ||||||||||
static void |
removePrintListener(Print.PrintCallback listener)
Remove a listener that was previously added via
addPrintListener(PrintCallback) . | ||||||||||
static void |
startPrintJob(Context context, String jobName, PDFDoc inputDoc, Integer printContent, Boolean isRtl, Context ocgContext)
Print the document using the current available printers or print services
installed on the device.
| ||||||||||
static void |
startPrintJob(Context context, String jobName, String outputName, PDFDoc inputDoc, Integer printContent, Boolean isRtl, Context ocgContext)
Print the document using the current available printers or print services
installed on the device.
| ||||||||||
static void |
startPrintJob(Context context, String jobName, PDFDoc doc, String password, Integer printContent, Boolean isRtl)
Print the document using the current available printers or print services installed on the
device and the supplied password.
| ||||||||||
static void |
startPrintJob(Context context, String jobName, PDFDoc inputDoc, Integer printContent, Boolean isRtl)
Print the document using the current available printers or print services
installed on the device.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Add a listener that will be invoked by Print.PrintCallback
.
Components that add a listener should take care to remove it when finished.
Other components that take ownership of the print may call clearPrintListeners()
to remove all attached listeners.
listener | listener to add |
---|
Remove all listeners that are notified of any callback from PrintCallback.
Export comments and summary of annotations
inputDoc | the document to be printed |
---|---|
isRtl | if true, the summary of annotations will be right aligned; otherwise, left aligned |
com.pdftron.common.PDFNetException | |
PDFNetException |
Remove a listener that was previously added via
addPrintListener(PrintCallback)
.
listener | listener to remove |
---|
Print the document using the current available printers or print services installed on the device.
Note:
startPrintJob(android.content.Context, String, PDFDoc, String, Integer, Boolean)
.context | the context |
---|---|
jobName | job name which will be displayed in the print queue |
inputDoc | the document to be printed |
printContent | the content to be printed. Valid values are
|
isRtl | if true, the summary of annotations will be right aligned; otherwise, left aligned |
ocgContext | if set, print the current OCG layers only |
PDFNetException | It will explicitly throw the
exception if:
|
---|
Print the document using the current available printers or print services installed on the device.
Note:
startPrintJob(android.content.Context, String, PDFDoc, String, Integer, Boolean)
.context | the context |
---|---|
jobName | job name which will be displayed in the print queue |
outputName | the name of the printed document |
inputDoc | the document to be printed |
printContent | the content to be printed. Valid values are
|
isRtl | if true, the summary of annotations will be right aligned; otherwise, left aligned |
ocgContext | if set, print the current OCG layers only |
PDFNetException | It will explicitly throw the
exception if:
|
---|
Print the document using the current available printers or print services installed on the device and the supplied password.
This method will try to initialize the document's SecurityHandler using the supplied password (it assumes the document uses standard security).
context | the context |
---|---|
jobName | job name which will be displayed in the print queue |
doc | the document to be printed |
password | the password |
printContent | the content to be printed. Valid values are
|
isRtl | if true, the summary of annotations will be right aligned; otherwise, left aligned |
PDFNetException | It will explicitly throw the exception if:
|
---|
Print the document using the current available printers or print services installed on the device.
Note:
startPrintJob(android.content.Context, String, PDFDoc, String, Integer, Boolean)
.context | the context |
---|---|
jobName | job name which will be displayed in the print queue |
inputDoc | the document to be printed |
printContent | the content to be printed. Valid values are
|
isRtl | if true, the summary of annotations will be right aligned; otherwise, left aligned |
PDFNetException | It will explicitly throw the
exception if:
|
---|