Custom Tool

Apryse SDK gives you the ability to create your own tools should you need one.

Creating a custom annotation tool in Xamarin.iOS

It is possible to create a new tool via C# API if you are looking for very simple tools that do not require much UI. Otherwise, you will have to customize the tools source code in Objective-C. The following section describes how to create a simple tool via C# API.

  1. Creating CustomTool:

C#

1using System;
2using ObjCRuntime;
3using pdftron.PDF;
4
5namespace PDFNetiOSXamarinSample
6{
7 public class CustomTool : pdftron.PDF.Tools.PTCreateToolBase
8 {
9 public CustomTool(PDFViewCtrl ctrl) : base(ctrl)
10 {
11 }
12
13 public override bool CreatesAnnotation
14 {
15 get
16 {
17 return true;
18 }
19 }
20
21 public override Class AnnotClass
22 {
23 get
24 {
25 return new Class(typeof(pdftronprivate.PTRedactionAnnot));
26 }
27 }
28 }
29
30}
  1. Using the tool:

C#

1mToolManager.Tool = new CustomTool(mPdfViewCtrl);

To learn more about how to modify the tools source code in Objective-C, check out this guide: Creating a new tool.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales