Some test text!

Print a document

Printing a PDF in Android

PDFTron SDK supports printing. The library handles all the hard work, you simply have to tell it to show the system print dialog with a document. This can be done with Print.startPrintJob.

Here is how:

void handlePrintJob(Activity activity, boolean isRtl,
    boolean printDocument,
    boolean printDocumentWithAnnotations,
    boolean printDocumentWithAnnotationSummary) {
    int printContent = 0;
    if (printDocument) {
        printContent |= Print.PRINT_CONTENT_DOCUMENT_BIT;
    if (printDocumentWithAnnotations) {
        printContent |= Print.PRINT_CONTENT_ANNOTATION_BIT;
    if (printDocumentWithAnnotationSummary) {
        printContent |= Print.PRINT_CONTENT_SUMMARY_BIT;
    Print.startPrintJob(activity, activity.getString(R.string.app_name), mPdfDoc, printContent, isRtl);

Get the answers you need: Support

Upcoming Webinar: Customer Experience and Retaining Control: Boosting Document Automation and Efficiency in Financial Services | Sept 15, 2022 at 11 am PT


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use