Print

Apryse SDK supports printing.

Printing a PDF document in Xamarin.iOS

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.PrintDoc. Here is how:

C#

1void handlePrintJob()
2{
3 pdftron.PDF.PTPrint print = new PTPrint();
4 print.PrepareDocToPrint(mPdfDoc, new MyPrintDelegate(this.View), btnPrint as NSObject);
5}

where MyPrintDelegate is:

C#

1public class MyPrintDelegate : pdftron.PDF.PTPrintDelegate
2{
3 private UIView _view;
4 public MyPrintDelegate(UIView view)
5 {
6 _view = view;
7 }
8 public override void PreparedToPrint(string docFilePath, NSObject userData)
9 {
10 var myPrint = new pdftron.PDF.PTPrint();
11 myPrint.PrintDoc(docFilePath, CGRect.Empty, _view, docFilePath, true, null);
12 }
13}

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales