Printing a PDF in Android

Apryse 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:

1void handlePrintJob(Activity activity, boolean isRtl,
2 boolean printDocument,
3 boolean printDocumentWithAnnotations,
4 boolean printDocumentWithAnnotationSummary) {
5 int printContent = 0;
6 if (printDocument) {
7 printContent |= Print.PRINT_CONTENT_DOCUMENT_BIT;
8 }
9 if (printDocumentWithAnnotations) {
10 printContent |= Print.PRINT_CONTENT_ANNOTATION_BIT;
11 }
12 if (printDocumentWithAnnotationSummary) {
13 printContent |= Print.PRINT_CONTENT_SUMMARY_BIT;
14 }
15 Print.startPrintJob(activity, activity.getString(R.string.app_name), mPdfDoc, printContent, isRtl);
16}

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales