Some test text!

Loading...
Guides
Print a document

Print

PDFTron SDK supports printing.

Printing a PDF document in Xamarin.Android

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, bool isRtl,
    bool printDocument,
    bool printDocumentWithAnnotations,
    bool printDocumentWithAnnotationSummary)
{
    var printContent = 0;
    if (printDocument)
    {
        printContent |= Print.PrintContent.DocumentBit;
    }
    if (printDocumentWithAnnotations)
    {
        printContent |= Print.PrintContent.AnnotationBit;
    }
    if (printDocumentWithAnnotationSummary)
    {
        printContent |= Print.PrintContent.SummaryBit;
    }
    Print.StartPrintJob(activity, activity.GetString(Resource.String.app_name), mPdfDoc, (int)printContent, isRtl);
}

Get the answers you need: Support

Upcoming Webinar: SDK Features Preview and Live Run-Through | July 14, 2022 at 11 am PT

PDFTron SDK

The Platform

NEW

© 2022 PDFTron Systems Inc. All rights reserved.

Privacy

Terms of Use