Tools framework overview

About Tools

PDFNet for iOS includes Tools.framework, an open-source companion framework that implements virtually all of the UI functionality. Because the framework is open source, any change to the UI required is possible.

The following functionality is implemented in Tools.framework:

  • PDF interaction:
    • Annotation creation/modification/deletion
    • Form filling
    • Signatures
    • Text selection
    • Link handling
    • Multimedia handling
  • UI Controls:
    • PDF outline
    • User bookmarks
    • Annotation toolbar
    • Annotation list
    • Page manipulation

Technical overview

The PDF interaction tools (listed above) handle the interactions by receiving touch and gesture events forward by the PTPDFViewCtrl. When a touch or gesture is made on the PTPDFViewCtrl, it sends the event to its tool delegate, which is implemented by the Tools.framework in the ToolManager class.

The ToolManger is then responsible for passing the event to the current tool. If the current tool has fully handled the event, it returns true, and the event processing is finished. If the current tool cannot fully handle the event, it returns false, and the tool manager then forwards the event to a new instance of a new tool.

The control flow is illustrated below:

Tools Control Flow How events are handled by Tools.framework.