{"id":103659,"date":"2024-09-10T06:46:11","date_gmt":"2024-09-09T22:46:11","guid":{"rendered":"https:\/\/gulass.cn\/?p=103659"},"modified":"2024-09-10T06:46:11","modified_gmt":"2024-09-09T22:46:11","slug":"linux-pdf","status":"publish","type":"post","link":"https:\/\/gulass.cn\/linux-pdf.html","title":{"rendered":"Linux\u4e0b\u628a\u7eaf\u6587\u672c\u6587\u6863\u8f6c\u6362\u6210PDF\u6587\u4ef6\u7684\u65b9\u6cd5"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u73b0\u5728\u6709\u5f88\u591a\u8f6f\u4ef6\u80fd\u591f\u5c06\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210PDF\u6587\u4ef6\uff0c\u5176\u5b9e\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u4e0d\u7528\u4f7f\u7528\u8f6f\u4ef6\u4e5f\u80fd\u5c06\u6587\u672c\u6587\u672c\u8f6c\u6362\u6210PDF\uff0c\u53ea\u9700\u8f7b\u677e\u4e24\u6b65\uff0c\u4e0b\u9762\u5c0f\u7f16\u5c31\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e0bLinux\u5c06\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210PDF\u6587\u4ef6\u7684\u65b9\u6cd5\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u95ee\u9898\uff1a\u6211\u60f3\u8981\u5c06\u4e00\u4e2a\u7eaf\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210PDF\u6587\u6863\u3002\u5728Linux\u547d\u4ee4\u884c\u4e0b\u662f\u5426\u6709\u4e00\u4e2a\u7b80\u5355\u7684\u65b9\u6cd5\u5c06\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210PDF\u6587\u4ef6?<\/p>\n

\"\"<\/p>\n

\u3000\u3000\u5f53\u4f60\u6709\u4e00\u5927\u5806\u6587\u672c\u6587\u4ef6\u8981\u7ef4\u62a4\u7684\u65f6\u5019\uff0c\u628a\u5b83\u4eec\u8f6c\u6362\u6210PDF\u6587\u6863\u4f1a\u597d\u4e00\u4e9b\u3002\u6bd4\u5982\uff0cPDF\u66f4\u9002\u5408\u6253\u5370\uff0c\u56e0\u4e3aPDF\u6587\u6863\u6709\u9884\u5b9a\u4e49\u5e03\u5c40\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u8fd8\u53ef\u4ee5\u51cf\u5c11\u6587\u6863\u88ab\u610f\u5916\u4fee\u6539\u7684\u98ce\u9669\u3002<\/p>\n

\u8981\u5c06\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210PDF\u683c\u5f0f\uff0c\u4f60\u8981\u6309\u7167\u4e0b\u9762\u7684\u4e24\u6b65\u3002<\/p>\n

\u51c6\u5907\u5de5\u4f5c<\/strong><\/div>\n

\u9996\u5148\u4f60\u8981\u5b89\u88c5\u4e24\u4e2a\u9700\u8981\u7684\u5305\u3002<\/p>\n

\u5728 Debian\u3001Ubuntu \u6216\u8005 Linux Mint\u4e0a\uff1a<\/p>\n

$ sudo apt-get install enscript ghostscript<\/pre>\n

\u5728 Fedora\u3001CentOS\/RHEL\u4e0a\uff1a<\/p>\n

$ sudo yum install enscript ghostscript<\/pre>\n

\u5728 Arch Linux\u4e0a\uff1a<\/p>\n

$ sudo pacman -S enscript ghostscript<\/pre>\n
\u5c06\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210PDF\u683c\u5f0f<\/strong><\/div>\n

\u51c6\u5907\u5de5\u4f5c\u5b8c\u6210\u4e4b\u540e\uff0c\u6309\u7167\u4e0b\u9762\u7684\u4e24\u6b65\u4ece\u6587\u672c\u6587\u4ef6\u751f\u6210\u4e00\u4e2aPDF\u6587\u4ef6<\/p>\n

\u9996\u5148\uff0c\u4f7f\u7528enscript\u547d\u4ee4\u884c\u5de5\u5177\u5c06\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210postscript\u683c\u5f0f\u3002<\/p>\n

$ enscript -p output.ps input.txt<\/pre>\n

\u6700\u540e\u5c06postscript\u683c\u5f0f\u6587\u4ef6\u8f6c\u6362\u6210PDF\u6587\u4ef6\u3002<\/p>\n

$ ps2pdf output.ps output.pdf<\/pre>\n

\u4e0a\u9762\u5c31\u662fLinux\u5c06\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210PDF\u7684\u6b65\u9aa4\u4ecb\u7ecd\u4e86\uff0c\u8fd9\u91cc\u9700\u8981\u4f7f\u7528\u5230\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u5982\u679c\u5bf9\u547d\u4ee4\u884c\u4e0d\u662f\u5f88\u4e86\u89e3\u7684\u670b\u53cb\uff0c\u4e5f\u53ef\u4e0b\u8f7d\u76f8\u5173\u5de5\u5177\u8fdb\u884c\u8f6c\u6362\u3002<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/www.jsgho.net\/help\/fwq\/27460.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1a https:\/\/gulass.cn\/linux-pdf.html<\/a>\u7f16\u8f91\uff1a\u90dd\u5927\u53d1\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb \u73b0\u5728\u6709\u5f88\u591a\u8f6f\u4ef6\u80fd\u591f\u5c06\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210PDF\u6587\u4ef6\uff0c\u5176\u5b9e\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u4e0d\u7528\u4f7f\u7528\u8f6f\u4ef6\u4e5f\u80fd\u5c06\u6587\u672c\u6587\u672c\u8f6c\u6362\u6210P […]<\/p>\n","protected":false},"author":63,"featured_media":104557,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-103659","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/103659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=103659"}],"version-history":[{"count":4,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/103659\/revisions"}],"predecessor-version":[{"id":292889,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/103659\/revisions\/292889"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/104557"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=103659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=103659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=103659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}