微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

pdftron Xamarin 形式的注释更改事件

如何解决pdftron Xamarin 形式的注释更改事件

我必须听 AnnotationModified 事件,如下所示。但不确定如何/何时,因为 CurentPdfViewCtrlFragment 为空。

我正在使用本示例中给出的 pdftron.PDF.Controls.DocumentView2 https://github.com/PDFTron/xamarin-forms-sample

enter image description here

enter image description here

解决方法

您应该覆盖 OnTabDocumentLoadedEvent 以确保片段不为空

https://www.pdftron.com/api/xamarinandroid/tools/api/pdftron.PDF.Controls.DocumentView2.html#pdftron_PDF_Controls_DocumentView2_OnTabDocumentLoaded_System_String_

,

我必须使用 MPdfViewCtrlTabHostFragment.CurrentPdfViewCtrlFragment 而不是 base.Viewer.CurrentPdfViewCtrlFragment

以下代码更改工作正常

mDocumentView.MPdfViewCtrlTabHostFragment.CurrentPdfViewCtrlFragment.ToolManager.AnnotationsModified += ToolManager_AnnotationsModified

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。