Some test text!

menu
search
Config toolskeyboard_arrow_down

Tools framework setup

This guide demonstrates how to set up the Tools framework. To begin using the Tools framework, you must have first added it to your project and set up the PDFNet library.

linkAdding a tool manager

The Tools.framework can be used in your project by simply adding a PTToolManager to an existing PTPDFViewCtrl as its tool delegate:

import Tools

// Create the tool manager (used to implement text selection, annotation editing, etc.)
self.toolManager = ToolManager(pdfViewCtrl: self.pdfViewCtrl)

// Register the tool manager to receive events.
self.pdfViewCtrl.toolDelegate = self.toolManager;

// Set the initial tool.
self.toolManager.changeTool(PanTool.self)

You can now tap to select and edit annotations, fill forms, long press to select text, and long press empty areas of the document to create annotations.

linkConfiguration

A ToolManager instance can be configured by setting its properties.

The following code shows how to disable text selection and editing of ink (free hand) annotations:

// Disable editing of ink annotations.
toolManager.inkAnnotationPermission.canEdit = false

// Disable text selection.
toolManager.textSelectionEnabled = false

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