<\/figure>\n<\/p>\n\u5de5\u5177\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u884c\u53c2\u6570\u6765\u6267\u884c\u4e0d\u540c\u7684\u64cd\u4f5c\uff1a<\/p>\n
1. \u5408\u5e76PDF\u6587\u4ef6<\/p>\n
-i inputfile1 inputfile2 … inputfileN -o outputfile<\/p>\n
\u5176\u4e2d\uff0c-i\u53c2\u6570\u6307\u5b9a\u8981\u5408\u5e76\u7684PDF\u6587\u4ef6\uff0c-o\u53c2\u6570\u6307\u5b9a\u8f93\u51fa\u6587\u4ef6\u7684\u540d\u79f0\u3002<\/p>\n
\u4f8b\u5982\uff0c\u8981\u5c06\u4e09\u4e2aPDF\u6587\u4ef6\u5408\u5e76\u6210\u4e00\u4e2a\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n
java -jar itextpdf-5.5.13.jar -i file1.pdf file2.pdf file3.pdf -o merged.pdf<\/p>\n
\u6b64\u547d\u4ee4\u5c06\u5408\u5e76file1.pdf\u3001file2.pdf\u548cfile3.pdf\uff0c\u5e76\u5c06\u7ed3\u679c\u4fdd\u5b58\u5728merged.pdf\u4e2d\u3002<\/p>\n
2. \u62c6\u5206PDF\u6587\u4ef6<\/p>\n
-s startpage -e endpage -o outputfile inputfile<\/p>\n
\u5176\u4e2d\uff0c-s\u53c2\u6570\u6307\u5b9a\u8981\u62c6\u5206\u7684\u8d77\u59cb\u9875\u7801\uff0c-e\u53c2\u6570\u6307\u5b9a\u8981\u62c6\u5206\u7684\u7ed3\u675f\u9875\u7801\uff0c-o\u53c2\u6570\u6307\u5b9a\u8f93\u51fa\u6587\u4ef6\u7684\u540d\u79f0\uff0cinputfile\u6307\u5b9a\u8981\u62c6\u5206\u7684PDF\u6587\u4ef6\u3002<\/p>\n
\u4f8b\u5982\uff0c\u8981\u5c06\u4e00\u4e2aPDF\u6587\u4ef6\u62c6\u5206\u6210\u4e24\u4e2a\u6587\u4ef6\uff0c\u7b2c\u4e00\u4e2a\u6587\u4ef6\u5305\u542b\u524d\u4e09\u9875\uff0c\u7b2c\u4e8c\u4e2a\u6587\u4ef6\u5305\u542b\u5269\u4f59\u7684\u9875\u9762\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n
java -jar itextpdf-5.5.13.jar -s 1 -e 3 -o file1.pdf inputfile<\/p>\n
java -jar itextpdf-5.5.13.jar -s 4 -o file2.pdf inputfile<\/p>\n
\u6b64\u547d\u4ee4\u5c06\u524d\u4e09\u9875\u4fdd\u5b58\u5728file1.pdf\u4e2d\uff0c\u5269\u4f59\u7684\u9875\u9762\u4fdd\u5b58\u5728file2.pdf\u4e2d\u3002<\/p>\n
3. \u63d0\u53d6PDF\u9875\u9762<\/p>\n
-e endpage -o outputfile -p page inputfile<\/p>\n
\u5176\u4e2d\uff0c-e\u53c2\u6570\u6307\u5b9a\u8981\u63d0\u53d6\u7684\u7ed3\u675f\u9875\u7801\uff0c-o\u53c2\u6570\u6307\u5b9a\u8f93\u51fa\u6587\u4ef6\u7684\u540d\u79f0\uff0c-p\u53c2\u6570\u6307\u5b9a\u8981\u63d0\u53d6\u7684\u9875\u9762\uff0cinputfile\u6307\u5b9a\u8981\u63d0\u53d6\u7684PDF\u6587\u4ef6\u3002<\/p>\n
\u4f8b\u5982\uff0c\u8981\u4ece\u4e00\u4e2aPDF\u6587\u4ef6\u4e2d\u63d0\u53d6\u7b2c\u4e09\u9875\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n
java -jar itextpdf-5.5.13.jar -e 3 -o extracted.pdf -p 3 inputfile<\/p>\n
\u6b64\u547d\u4ee4\u5c06\u7b2c\u4e09\u9875\u4fdd\u5b58\u5728extracted.pdf\u4e2d\u3002<\/p>\n
4. \u63d2\u5165PDF\u9875\u9762<\/p>\n
-i insertfile -p page -o outputfile inputfile<\/p>\n
\u5176\u4e2d\uff0c-i\u53c2\u6570\u6307\u5b9a\u8981\u63d2\u5165\u7684PDF\u6587\u4ef6\uff0c-p\u53c2\u6570\u6307\u5b9a\u8981\u63d2\u5165\u7684\u9875\u9762\uff0c-o\u53c2\u6570\u6307\u5b9a\u8f93\u51fa\u6587\u4ef6\u7684\u540d\u79f0\uff0cinputfile\u6307\u5b9a\u8981\u63d2\u5165\u9875\u9762\u7684PDF\u6587\u4ef6\u3002<\/p>\n
\u4f8b\u5982\uff0c\u8981\u5c06\u4e00\u4e2aPDF\u9875\u9762\u63d2\u5165\u5230\u53e6\u4e00\u4e2aPDF\u6587\u4ef6\u7684\u7b2c\u4e09\u9875\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n
java -jar itextpdf-5.5.13.jar -i insertfile.pdf -p 1 -o outputfile.pdf inputfile.pdf<\/p>\n
\u6b64\u547d\u4ee4\u5c06insertfile.pdf\u7684\u7b2c\u4e00\u9875\u63d2\u5165\u5230inputfile.pdf\u7684\u7b2c\u4e09\u9875\uff0c\u5e76\u5c06\u7ed3\u679c\u4fdd\u5b58\u5728outputfile.pdf\u4e2d\u3002<\/p>\n
5. \u65cb\u8f6cPDF\u9875\u9762<\/p>\n
-r degrees -o outputfile inputfile<\/p>\n
\u5176\u4e2d\uff0c-r\u53c2\u6570\u6307\u5b9a\u65cb\u8f6c\u7684\u89d2\u5ea6\uff0c-o\u53c2\u6570\u6307\u5b9a\u8f93\u51fa\u6587\u4ef6\u7684\u540d\u79f0\uff0cinputfile\u6307\u5b9a\u8981\u65cb\u8f6c\u7684PDF\u6587\u4ef6\u3002<\/p>\n
\u4f8b\u5982\uff0c\u8981\u5c06\u4e00\u4e2aPDF\u6587\u4ef6\u7684\u6240\u6709\u9875\u9762\u65cb\u8f6c90\u5ea6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n
java -jar itextpdf-5.5.13.jar -r 90 -o rotated.pdf inputfile.pdf<\/p>\n
\u6b64\u547d\u4ee4\u5c06inputfile.pdf\u7684\u6240\u6709\u9875\u9762\u65cb\u8f6c90\u5ea6\uff0c\u5e76\u5c06\u7ed3\u679c\u4fdd\u5b58\u5728rotated.pdf\u4e2d\u3002<\/p>\n
6. \u538b\u7f29PDF\u6587\u4ef6<\/p>\n
-c compressionlevel -o outputfile inputfile<\/p>\n
\u5176\u4e2d\uff0c-c\u53c2\u6570\u6307\u5b9a\u538b\u7f29\u7ea7\u522b\uff0c-o\u53c2\u6570\u6307\u5b9a\u8f93\u51fa\u6587\u4ef6\u7684\u540d\u79f0\uff0cinputfile\u6307\u5b9a\u8981\u538b\u7f29\u7684PDF\u6587\u4ef6\u3002<\/p>\n
\u4f8b\u5982\uff0c\u8981\u538b\u7f29\u4e00\u4e2aPDF\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n
java -jar itextpdf-5.5.13.jar -c 9 -o compressed.pdf inputfile.pdf<\/p>\n
\u6b64\u547d\u4ee4\u5c06inputfile.pdf\u538b\u7f29\u4e3acompressed.pdf\uff0c\u5e76\u4f7f\u7528\u6700\u9ad8\u538b\u7f29\u7ea7\u522b\uff089\uff09\u3002<\/p>\n
\u603b\u7ed3<\/p>\n
iText\u7684exe\u7a0b\u5e8f\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u81ea\u52a8\u5316PDF\u6587\u6863\u5904\u7406\u4efb\u52a1\u3002\u5b83\u53ef\u4ee5\u5408\u5e76\u3001\u62c6\u5206\u3001\u63d0\u53d6\u3001\u63d2\u5165\u3001\u65cb\u8f6c\u548c\u538b\u7f29PDF\u6587\u4ef6\uff0c\u4f7fPDF\u6587\u6863\u7684\u5904\u7406\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002iText\u7684exe\u7a0b\u5e8f\u4f7f\u7528iText\u5e93\u6765\u5904\u7406PDF\u6587\u6863\uff0c\u8be5\u5e93\u63d0\u4f9b\u4e86\u8bb8\u591a\u7c7b\u548c\u65b9\u6cd5<\/p>\n","protected":false},"excerpt":{"rendered":"
iText\u662f\u4e00\u4e2a\u5f00\u6e90\u5e93\uff0c\u7528\u4e8e\u521b\u5efa\u548c\u64cd\u4f5cPDF\u6587\u4ef6\u3002\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684API\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u521b\u5efa\u3001\u7f16\u8f91\u548c\u5904\u7406PDF\u6587\u6863\u3002iText\u7684exe\u7a0b\u5e8f\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u53ef\u4ee5\u4f7f\u7528iText\u5e93\u6765\u81ea\u52a8\u5316PDF\u6587\u6863\u5904\u7406\u4efb\u52a1\u3002<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[9117,795,9118,16,361],"topic":[],"class_list":["post-4798","post","type-post","status-publish","format-standard","hentry","category-exekf","tag-windows","tag-795","tag-9118","tag-16","tag-361"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/4798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=4798"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/4798\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=4798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=4798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=4798"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=4798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}