{"id":5945,"date":"2025-07-07T14:29:12","date_gmt":"2025-07-07T06:29:12","guid":{"rendered":"https:\/\/support.fuxinsoft.cn\/?p=5945"},"modified":"2025-07-07T14:29:12","modified_gmt":"2025-07-07T06:29:12","slug":"%e5%a6%82%e4%bd%95%e5%88%86%e5%88%ab%e8%87%aa%e5%ae%9a%e4%b9%89%e6%96%87%e6%9c%ac%e7%b1%bb%e5%9e%8b%e6%b3%a8%e9%87%8a%ef%bc%88%e6%89%93%e5%ad%97%e6%9c%ba-%e6%96%87%e6%9c%ac%e6%a1%86-%e6%b3%a8%e9%87%8a","status":"publish","type":"post","link":"https:\/\/support.fuxinsoft.cn\/?p=5945","title":{"rendered":"\u5982\u4f55\u5206\u522b\u81ea\u5b9a\u4e49\u6587\u672c\u7c7b\u578b\u6ce8\u91ca\uff08\u6253\u5b57\u673a\/\u6587\u672c\u6846\/\u6ce8\u91ca\u6846\uff09\u7684\u9ed8\u8ba4\u6837\u5f0f\u5c5e\u6027"},"content":{"rendered":"\n<p>\u81ea\u5b9a\u4e49\u6ce8\u91ca\u7684\u9ed8\u8ba4\u5c5e\u6027\u914d\u7f6e\u53ef\u53c2\u8003\u5f00\u53d1\u5305\u5185\u7f6e\u793a\u4f8b\uff1aexamples\\UIExtension\\default_annot_config\\index.html<\/p>\n\n\n\n<p>\u901a\u8fc7freetext\u6ce8\u91ca\u7684intent\u5c5e\u6027\u53ef\u533a\u5206\u6253\u5b57\u673a\u3001\u6587\u672c\u6846\u548c\u6ce8\u91ca\u6846\uff0c\u5e76\u5206\u522b\u8bbe\u7f6e\u9ed8\u8ba4\u6837\u5f0f\u3002\u5173\u952e\u914d\u7f6e\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var PDFUI = UIExtension.PDFUI;\nvar Events = UIExtension.PDFViewCtrl.Events;\nvar pdfui = new PDFUI({\n    viewerOptions: {\n        libPath: '..\/..\/..\/lib',\n        jr: {\n            readyWorker: readyWorker\n        },\n        \/\/The global annotation properties can be set by using the constructor option.\n        defaultAnnotConfig: function(type, intent) {\n            let config = {};\n            switch (type) {\n                case \"highlight\":\n                    config.color = 0xff123456;\n                    config.opacity = 0.05; \/\/\u4e0d\u900f\u660e\u5ea6\n                    break;\n                case \"square\":\n                    config.color = 0xffffff00;\n                    config.fillColor = 0xffA236B2;\n                    config.borderInfo = {\n                        style: 6,\n                    }\n                    break;\n                case \"freetext\":\n                    if(intent==\"FreeTextTypewriter\")  \/\/\u6253\u5b57\u673a\n                    { \n                        config.defaultAppearance = {\n                            textColor:0xffA236B2,\/\/\u53ef\u4ee5\u4f2016\u8fdb\u5236\u7684\u989c\u8272\u503c\n                            \/\/ textColor:17462,\/\/\u4e5f\u53ef\u4ee5\u4f20\u5341\u8fdb\u5236\u7684\u989c\u8272\u503c\n                            textSize:15\/\/\u5b57\u53f7\n                        }\n                    }\n                    else if(intent==\"FreeTextCallout\")  \/\/\u6ce8\u91ca\u6846\n                    { \n                        config.calloutLineEndingStyle=2;\n                        config.defaultAppearance = {\n                            textColor:0xffff0000,\/\/\u53ef\u4ee5\u4f2016\u8fdb\u5236\u7684\u989c\u8272\u503c\n                            \/\/ textColor:17462,\/\/\u4e5f\u53ef\u4ee5\u4f20\u5341\u8fdb\u5236\u7684\u989c\u8272\u503c\n                            textSize:20\/\/\u5b57\u53f7\n                        }\n                    }else{ \/\/\u6587\u672c\u6846\n                        config.defaultAppearance = {  \/\/\u6587\u672c\u6846\u7684\u6587\u672c\u989c\u8272\u548c\u5b57\u53f7\n                            textColor:0xffEE9720,\/\/\u53ef\u4ee5\u4f2016\u8fdb\u5236\u7684\u989c\u8272\u503c\n                            \/\/ textColor:17462,\/\/\u4e5f\u53ef\u4ee5\u4f20\u5341\u8fdb\u5236\u7684\u989c\u8272\u503c\n                            textSize:25\/\/\u5b57\u53f7\n                        };\n                        config.fillColor = 4279560723; \/\/\u6587\u672c\u6846\u7684\u586b\u5145\u8272\n                        config.color = 5055986; \/\/\u8fb9\u6846\u989c\u8272\n                        config.borderInfo = {\n                            width: 5,\n                            style: 1,  \/\/ 0 - \u5b9e\u7ebf \uff0c 1 - \u865a\u7ebf \uff0c6 - \u65e0\u8fb9\u6846\u3002\u53ea\u6709\u4e3a\u865a\u7ebf\u65f6dashPhase\u548cdashes\u624d\u751f\u6548\n                            dashPhase:0,\n                            dashes:&#91;3,3,3,3]\n                        }\n                    }\n                    \n                    break;\n                default:\n                    config.color = 0xff002300;\n                    break;\n            }\n            return config;\n        }\n    },\n    renderTo: '#pdf-ui',\n    appearance: UIExtension.appearances.adaptive,\n    fragments: &#91;],\n    addons: UIExtension.PDFViewCtrl.DeviceInfo.isMobile ?\n        '..\/..\/..\/lib\/uix-addons\/allInOne.mobile.js' : '..\/..\/..\/lib\/uix-addons\/allInOne.js'\n});\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u5b9a\u4e49\u6ce8\u91ca\u7684\u9ed8\u8ba4\u5c5e\u6027\u914d\u7f6e\u53ef\u53c2\u8003\u5f00\u53d1\u5305\u5185\u7f6e\u793a\u4f8b\uff1aexamples\\UIExtension\\default_ann [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[807,806,787,788,374,789,790,804,805],"class_list":["post-5945","post","type-post","status-publish","format-standard","hentry","category-websdk","tag-freetext","tag-intent","tag-787","tag-788","tag-374","tag-789","tag-790","tag-804","tag-805"],"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\/5945","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\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5945"}],"version-history":[{"count":3,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/5945\/revisions"}],"predecessor-version":[{"id":6026,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/5945\/revisions\/6026"}],"wp:attachment":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}