{"id":3857,"date":"2025-01-02T15:21:20","date_gmt":"2025-01-02T07:21:20","guid":{"rendered":"https:\/\/support.foxitsoftware.cn\/?p=3857"},"modified":"2025-01-02T15:21:22","modified_gmt":"2025-01-02T07:21:22","slug":"%e5%a6%82%e4%bd%95%e5%88%a0%e9%99%a4screen%e6%88%96movie%e7%ad%89%e6%b3%a8%e9%87%8a%e7%9a%84%e9%bb%91%e8%89%b2%e8%be%b9%e6%a1%86%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/support.fuxinsoft.cn\/?p=3857","title":{"rendered":"\u5982\u4f55\u5220\u9664Screen\u6216Movie\u7b49\u6ce8\u91ca\u7684\u9ed1\u8272\u8fb9\u6846\uff1f"},"content":{"rendered":"\n<p>\u901a\u8fc7SDK\u7684\u63a5\u53e3\u5728PDF\u4e0a\u521b\u5efaScreen \u6216\u8005moive\u7b49\u6ce8\u91ca\u65f6\uff0c\u901a\u5e38\u662f\u81ea\u5e26\u6709\u9ed1\u8272\u8fb9\u6846\u7684\u3002\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"342\" height=\"170\" src=\"https:\/\/support.fuxinsoft.cn\/wp-content\/uploads\/2024\/12\/image-74.png\" alt=\"\" class=\"wp-image-3891\" style=\"width:619px;height:auto\" srcset=\"https:\/\/support.fuxinsoft.cn\/wp-content\/uploads\/2024\/12\/image-74.png 342w, https:\/\/support.fuxinsoft.cn\/wp-content\/uploads\/2024\/12\/image-74-300x149.png 300w\" sizes=\"(max-width: 342px) 100vw, 342px\" \/><\/figure>\n\n\n\n<p>\u5982\u679c\u5e0c\u671b\u5e0c\u671b\u63a7\u5236\u8fb9\u6846\u7684\u7c97\u7ec6\u6216\u989c\u8272\uff0c\u53ef\u4ee5\u901a\u8fc7setBorderInfo()\u63a5\u53e3\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<p>\u4f46\u5982\u679c\u9700\u8981\u5220\u9664\u8fb9\u6846\u7ebf\uff0c\u53ef\u4ee5\u5728\u6ce8\u91ca\u751f\u6210\u540e\u901a\u8fc7\u83b7\u53d6\u6ce8\u91ca\u5916\u89c2\u6d41\u7684\u65b9\u5f0f\uff0c\u5220\u9664\u9ed1\u6846\u3002\u5220\u9664\u540e\uff0c\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"286\" height=\"129\" src=\"https:\/\/support.fuxinsoft.cn\/wp-content\/uploads\/2024\/12\/image-76.png\" alt=\"\" class=\"wp-image-3893\" style=\"width:620px;height:auto\"\/><\/figure>\n\n\n\n<p>\u5b8c\u6574\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-body-font-family has-medium-font-size\"><code>\n            PDFDoc doc=new PDFDoc();\n            doc.load(null);\n            PDFPage page= doc.insertPage(0,PDFPage.e_SizeA4);\n            page.startParse(0,null,true);\n            Annot annot= page.addAnnot(Annot.e_Screen,new RectF(100,100,300,200));\n            Screen screen=new Screen(annot);\n            screen.setImage(new Image(\"D:\\\\test\\\\foxitLogo.png\"),0,0);\n            screen.resetAppearanceStream();\n            PDFStream stream= screen.getAppearanceStream(0,\"\");\n            long dataLen=stream.getDataSize(true).longValue();\n            byte&#91;] streamData = new byte&#91;(int) dataLen];\n\n            stream.getData(true,dataLen,streamData);\n            String oldAp=new String(streamData, \"UTF-8\");\n            \/\/ \u5220\u9664\u5916\u89c2\u6d41\u4e2d\u7684\u9ed1\u8272\u77e9\u5f62\u6846\n            StringBuilder newAp = new StringBuilder();\n            String&#91;] lines = oldAp.split(\"\\n\");\n            for (int i = 0; i &lt; lines.length; i++) {\n                if (i &lt; 1 || i &gt; 6) {\n                    if (newAp.length() &gt; 0) {\n                        newAp.append(\"\\n\");\n                    }\n                    newAp.append(lines&#91;i]);\n                }\n            }\n            stream.setData(newAp.toString().getBytes());\n            doc.saveAs(\"D:\\\\DownLoad\\\\result.pdf\",0);<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7SDK\u7684\u63a5\u53e3\u5728PDF\u4e0a\u521b\u5efaScreen \u6216\u8005moive\u7b49\u6ce8\u91ca\u65f6\uff0c\u901a\u5e38\u662f\u81ea\u5e26\u6709\u9ed1\u8272\u8fb9\u6846\u7684\u3002\u5982\u4e0b\u6240\u793a\uff1a \u5982\u679c\u5e0c [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[],"class_list":["post-3857","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\/3857","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\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3857"}],"version-history":[{"count":3,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/3857\/revisions"}],"predecessor-version":[{"id":3929,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/3857\/revisions\/3929"}],"wp:attachment":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}