Some test text!

menu
search

Custom Tool

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

Creating a new tool

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:

    using System;
    using ObjCRuntime;
    using pdftron.PDF;
    
    namespace PDFNetiOSXamarinSample
    {
        public class CustomTool : pdftron.PDF.Tools.PTCreateToolBase
        {
            public CustomTool(PDFViewCtrl ctrl) : base(ctrl)
            {
            }
    
            public override bool CreatesAnnotation
            {
                get
                {
                    return true;
                }
            }
    
            public override Class AnnotClass
            {
                get
                {
                    return new Class(typeof(pdftronprivate.PTRedactionAnnot));
                }
            }
        }
    
    }
  2. Using the tool:
mToolManager.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.

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.

PDFTron Receives USD$71 Million Growth Investment Led By Silversmith Capital Partners

Learn more
close