- 宗亚璇用户2024-11-22[[{"txt": "\u6b64\u7ecf\u9a8c\u5c06\u4ecb\u7ecd\u901a\u8fc7Java\u7f16\u7a0b\u6765\u52a0\u5bc6PPT\u5e7b\u706f\u7247\u6587\u6863\u3002\u8fd9\u91cc\u52a0\u5bc6PPT\u52062\u79cd\u60c5\u51b5\u6765\u8bbe\u7f6e\uff1a1.\u8bbe\u7f6e\u6253\u5f00\u6587\u6863\u7684\u5bc6\u78012.\u8bbe\u7f6e\u5e7b\u706f\u7247\u7684\u7f16\u8f91\u6743\u9650\u5bc6\u7801"}], [{"txt": ["\u5de5\u5177/\u539f\u6599"]}, {"txt": "Free Spire.Presentation for Java v2.2.3\uff08\u514d\u8d39\u7248\uff09"}], [{"txt": ["jar\u6587\u4ef6\u5bfc\u5165"]}, {"txt": "\u6b65\u9aa41\uff1a\u5728Java\u7a0b\u5e8f\u4e2d\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\u53ef\u547d\u540d\u4e3aLib\u3002\u5e76\u5c06\u4e0b\u8f7d\u5305\u4e2dlib\u6587\u4ef6\u5939\u4e2d\uff08\u5982\u4e0b\u56fe\uff09\u7684jar\u6587\u4ef6\u590d\u5236\u5230\u65b0\u5efa\u7684\u6587\u4ef6\u5939\u4e0b\u3002"}, {"img": ["https://exp-picture.cdn.bcebos.com/560be432939c2cf70a9871ad452c5b1b1fde1283.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}, {"txt": "\u6b65\u9aa42\uff1a\u590d\u5236\u6587\u4ef6\u540e\uff0c\u6dfb\u52a0\u5230\u5f15\u7528\u7c7b\u5e93\uff1a\u9009\u4e2d\u8fd9\u4e2ajar\u6587\u4ef6\uff0c\u70b9\u51fb\u9f20\u6807\u53f3\u952e\uff0c\u9009\u62e9\u201cBuild Path\u201d \u2013 \u201cAdd to Build Path\u201d\u3002\u5b8c\u6210\u5f15\u7528\u3002"}, {"img": ["https://exp-picture.cdn.bcebos.com/a1780d1fceecd3d9b65f5f706799594305010883.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}], [{"txt": ["Java\u793a\u4f8b\u4ee3\u7801\uff08\u4f9b\u53c2\u8003\uff09"]}, {"txt": "import com.spire.presentation.*;public class Encrypt_PPT {public static void main(String[] args) throws Exception {\u00a0 \u00a0 //\u52a0\u8f7d\u6587\u6863\u00a0 \u00a0 Presentation presentation = new Presentation();\u00a0 \u00a0 presentation.loadFromFile(\"sample.pptx\");\u00a0 \u00a0 //\u8bbe\u7f6e\u6253\u5f00\u6587\u6863\u7684\u5bc6\u7801\u00a0 \u00a0 //presentation.encrypt(\"123456\");\u00a0 \u00a0 ////\u8bbe\u7f6e\u5141\u8bb8\u7f16\u8f91\u6587\u6863\u7684\u5bc6\u7801\u00a0 \u00a0 presentation.protect(\"123456\");\u00a0 \u00a0 //\u4fdd\u5b58\u6587\u6863\u00a0 \u00a0 presentation.saveToFile(\"Encrypted.pptx\", FileFormat.PPTX_2010);\u00a0 \u00a0 //presentation.saveToFile(\"Protected.pptx\", FileFormat.PPTX_2010);\u00a0 }}"}, {"txt": "\u5b8c\u6210\u4ee3\u7801\u540e\uff0c\u8fd0\u884c\u7a0b\u5e8f\uff0c\u751f\u6210\u6587\u6863\uff0c\u6548\u679c\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}, {"img": ["https://exp-picture.cdn.bcebos.com/1f03436b04d1492973a294a763e5eceeacbc7e83.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1", "https://exp-picture.cdn.bcebos.com/edafb3bcbe2f4770b632726e6f3b3b8603217983.m2m?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1"]}]]1楼