-1

Im using PDFtron on a windows store app project.

I have a page with a back button and a pdf viewer where i can edit the pdfs.

When im editing a pdf i have a tool bar with options like the ones in the samples, but i have a issue when i choose a Free Text tool and start writing on the pdf, if i press the back button while the Free Text tool is active ( the cursor is bliking) the text i wrote appears in the screen on the next page i navigate to.

How can i solve this?

Thought
  • 5,326
  • 7
  • 33
  • 69

1 Answers1

0

The TextBox in question is part of the PDFViewCtrlTools that are used to create annotations. It is shipped with the sample application and is fully open source. The TextBox is inside a popup, positioned to align itself on top of the PDFViewCtrl in the position where you tapped. This TextBox needs to be closed before you go back. It is quite easy to do so by calling ToolManager.CreateDefaultTool(). In general, I would recommend taking a look at the samples and see what they're doing when the user tries to navigate away from the page.

Everytime you navigate away from a page with PDFViewCtrl, the ToolManager should call CreateDefaultTool so that whatever current tool is active (in this case the FreeTextCreate tool) can close itself and clean up.

Ryan
  • 2,473
  • 1
  • 11
  • 14