{"id":3729,"date":"2024-12-29T20:23:32","date_gmt":"2024-12-29T12:23:32","guid":{"rendered":"https:\/\/support.foxitsoftware.cn\/?p=3729"},"modified":"2024-12-30T15:54:28","modified_gmt":"2024-12-30T07:54:28","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88%e4%bd%bf%e7%94%a8gsdk%e6%9b%b4%e6%94%b9%e8%a1%a8%e5%8d%95%e5%9f%9f%e5%b1%9e%e6%80%a7%e3%80%81%e8%a1%a8%e5%8d%95%e5%9f%9f%e5%80%bc%e7%9a%84%e6%97%b6%e5%80%99%e6%b2%a1","status":"publish","type":"post","link":"https:\/\/support.fuxinsoft.cn\/?p=3729","title":{"rendered":"\u4e3a\u4ec0\u4e48\u4f7f\u7528GSDK\u66f4\u6539\u8868\u5355\u57df\u5c5e\u6027\u3001\u8868\u5355\u57df\u503c\u7684\u65f6\u5019\u6ca1\u6709\u6548\u679c\uff1f"},"content":{"rendered":"\n<p>\u8bf7\u53c2\u8003\u4ee5\u4e0b\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Add text field\t\t\t\ntry {\t\t\t\t\nControl control = form.addControl(page, \"Text Field0\", Field.e_TypeTextField, new RectF(50, 600, 90, 640));\t\t\t\tDefaultAppearance defaultAppearance = new DefaultAppearance(e_FlagFont|e_FlagFontSize|e_FlagTextColor,new Font(e_StdIDCourier),10,1);\t\t\t\tcontrol.getField().setDefaultAppearance(defaultAppearance);\t\t\t\tcontrol.getField().setValue(\"3\u6d4b\u8bd5\");\t\t\t\t\/\/ Update text field's appearance.\t\t\t\tcontrol.getWidget().resetAppearanceStream();\t\t\t\t\/\/\u8fd9\u6bb5\u53ef\u6ce8\u91ca\u6389\uff0c\u5148\u6267\u884c\u4e0a\u9762\u7684\u4ee3\u7801\uff0c\u5bf9\u6bd4\u770b\u5dee\u5f02\t\t\t\tDefaultAppearance defaultAppearance_New = control.getField().getDefaultAppearance(); \/\/\t\t\t\tdefaultAppearance_New.setText_size(20);\t\t\t\tdefaultAppearance_New.setText_color(16711680);\t\t\t\tcontrol.getField().setDefaultAppearance(defaultAppearance_New);\t\t\t\tcontrol.getField().setValue(\"new \u6d4b\u8bd5\");\t\t\t\tcontrol.getWidget().resetAppearanceStream();\t\t\t} catch (PDFException e) {\t\t\t\te.printStackTrace();\t\t\t\n}\t\t\t\nSystem.out.println(\"Add text field.\");<\/code><\/pre>\n\n\n\n<p>\u60a8\u9700\u8981\u6ce8\u610f\u6b64\u6837\u4f8b\u7684\u5904\u7406\u903b\u8f91\uff0c\u5e76\u4e14\u6ce8\u610fresetAppearanceStream()\u65b9\u6cd5\u7684\u8c03\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u53c2\u8003\u4ee5\u4e0b\u793a\u4f8b\u4ee3\u7801\uff1a \u60a8\u9700\u8981\u6ce8\u610f\u6b64\u6837\u4f8b\u7684\u5904\u7406\u903b\u8f91\uff0c\u5e76\u4e14\u6ce8\u610fresetAppearanceStream()\u65b9\u6cd5\u7684 [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[],"class_list":["post-3729","post","type-post","status-publish","format-standard","hentry","category-gsdk"],"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\/3729","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\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3729"}],"version-history":[{"count":2,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/3729\/revisions"}],"predecessor-version":[{"id":3731,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/3729\/revisions\/3731"}],"wp:attachment":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}