{"id":7138,"date":"2025-11-25T11:10:27","date_gmt":"2025-11-25T03:10:27","guid":{"rendered":"https:\/\/support.fuxinsoft.cn\/?p=7138"},"modified":"2025-11-25T11:10:27","modified_gmt":"2025-11-25T03:10:27","slug":"%e5%a6%82%e4%bd%95%e8%ae%be%e7%bd%ae%e7%94%a8%e6%88%b7%e4%bb%85%e5%8f%af%e5%88%a0%e9%99%a4%e8%87%aa%e8%ba%ab%e6%b3%a8%e9%87%8a%e7%9a%84%e6%9d%83%e9%99%90%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/support.fuxinsoft.cn\/?p=7138","title":{"rendered":"\u5982\u4f55\u8bbe\u7f6e\u7528\u6237\u4ec5\u53ef\u5220\u9664\u81ea\u8eab\u6ce8\u91ca\u7684\u6743\u9650\uff1f"},"content":{"rendered":"\n<p>\u5728\u534f\u4f5c\u5ba1\u9605\u573a\u666f\u4e2d\uff0c\u9650\u5236\u7528\u6237\u4ec5\u80fd\u5220\u9664\u81ea\u5df1\u6dfb\u52a0\u7684\u6ce8\u91ca\u662f\u4e00\u9879\u5e38\u89c1\u9700\u6c42\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7 Foxit PDF SDK for Web \u7684&nbsp;<strong>\u6ce8\u91ca\u6743\u9650\u7ba1\u7406\u5668 (AnnotationAuthorityManager)<\/strong>&nbsp;\u8f7b\u677e\u5b9e\u73b0\uff0c\u5176\u5b8c\u6574\u529f\u80fd\u8bf7\u53c2\u9605&nbsp;<a href=\"https:\/\/devdocs.fuxinsoft.cn\/development-guide\/pdf-sdk-web\/features\/annotation-authority-manager.html\" target=\"_blank\" rel=\"noreferrer noopener\">AnnotationAuthorityManager \u5f00\u53d1\u6587\u6863<\/a>\u3002<\/p>\n\n\n\n<p><strong>\u6838\u5fc3\u601d\u8def<\/strong><br>\u4e3a\u5f53\u524d\u7528\u6237\u914d\u7f6e\u7279\u5b9a\u7684\u6743\u9650\u89c4\u5219\uff0c\u7cbe\u786e\u63a7\u5236\u5176\u5bf9\u81ea\u8eab\u521b\u5efa\u548c\u4ed6\u4eba\u521b\u5efa\u7684\u6ce8\u91ca\u7684\u64cd\u4f5c\u80fd\u529b\u3002<\/p>\n\n\n\n<p><strong>\u4ee3\u7801\u5b9e\u73b0<\/strong><br>\u4ee5\u4e0b\u793a\u4f8b\u6f14\u793a\u4e86\u5982\u4f55\u8bbe\u7f6e\u5f53\u524d\u7528\u6237\u53ea\u80fd\u5220\u9664\u81ea\u8eab\u6ce8\u91ca\uff0c\u4e14\u65e0\u6cd5\u64cd\u4f5c\u4ed6\u4eba\u6ce8\u91ca\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var userName = await pdfui.getUserName()\nconst pdfViewer = await pdfui.getPDFViewer();\n\/\/ \u83b7\u53d6 AnnotationAuthorityManager \u7ba1\u7406\u5668\nconst annotAuthMgr = pdfViewer.getAnnotAuthorityManager();\nconst ANNOTATION_PERMISSION = UIExtension.PDFViewCtrl.constants.ANNOTATION_PERMISSION;\n    \/\/\u8bbe\u7f6e\u9664\u4e86\u5f53\u524d\u7528\u6237\u7684\u6ce8\u91ca\uff0c\u90fd\u53ea\u6709\u5220\u9664\u6743\u9650\n    annotAuthMgr.setAnnotPermissionCallback(function(annot) {\n    if (annot.getTitle() != userName) {\n        return Promise.resolve(&#91;ANNOTATION_PERMISSION.deletable]);\n    }\n    \/\/ \u5176\u4ed6\u6ce8\u91ca\u53ef\u4ee5\u8fd4\u56de\u4e0d\u540c\u7684\u6743\u9650\u7ec4\u5408\uff0c\u4f8b\u5982\u8fd4\u56de null \u5219\u5ffd\u7565\u6743\u9650\u9650\u5236\n    return null;\n});\n\/\/ \u9700\u8981\u624b\u52a8\u66f4\u65b0\u6240\u6709 annotation \u7684\u4ea4\u4e92\u6ce8\u91ca\u6743\u9650\uff0c\u4f7f\u8bbe\u7f6e\u7acb\u5373\u751f\u6548\nawait annotAuthMgr.updateAll();<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u534f\u4f5c\u5ba1\u9605\u573a\u666f\u4e2d\uff0c\u9650\u5236\u7528\u6237\u4ec5\u80fd\u5220\u9664\u81ea\u5df1\u6dfb\u52a0\u7684\u6ce8\u91ca\u662f\u4e00\u9879\u5e38\u89c1\u9700\u6c42\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7 Foxit PDF SDK for [&hellip;]<\/p>\n","protected":false},"author":33,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[478,595,1195,443,374,1194,1196],"class_list":["post-7138","post","type-post","status-publish","format-standard","hentry","category-websdk","tag-annotationauthoritymanager","tag-websdk","tag-1195","tag-443","tag-374","tag-1194","tag-1196"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","_links":{"self":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/7138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7138"}],"version-history":[{"count":2,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/7138\/revisions"}],"predecessor-version":[{"id":7228,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/7138\/revisions\/7228"}],"wp:attachment":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}