{"id":16,"date":"2018-07-07T02:49:41","date_gmt":"2018-07-06T18:49:41","guid":{"rendered":"http:\/\/www.adebug.com\/?p=16"},"modified":"2018-07-07T02:49:41","modified_gmt":"2018-07-06T18:49:41","slug":"linux%e4%b8%8bofficedocdocxxlsxlsxpptpptx%e8%bd%acpdf","status":"publish","type":"post","link":"http:\/\/www.adebug.com\/?p=16","title":{"rendered":"Linux\u4e0boffice(doc,docx,xls,xlsx,ppt,pptx)\u8f6cpdf"},"content":{"rendered":"<h2>\u5b89\u88c5office\u5957\u4ef6<\/h2>\n<pre><code class=\"shell\">yum install libreoffice\n<\/code><\/pre>\n<h2>\u8f6c\u6362\u811a\u672c<\/h2>\n<pre><code class=\"shell\">soffice --headless --invisible --convert-to pdf \u6e90\u6587\u4ef6\u8def\u5f84.doc --outdir \u751f\u6210\u6587\u4ef6\u4fdd\u5b58\u76ee\u5f55\n<\/code><\/pre>\n<h2>SHELL\u811a\u672c<\/h2>\n<pre><code class=\"shell\">#!\/bin\/sh    \n\nsource=$1  \necho ${source}   \nsoffice --headless --invisible --convert-to pdf ${source} --outdir \/tmp\/ \n<\/code><\/pre>\n<h2>\u5e38\u89c1\u9519\u8bef<\/h2>\n<pre><code class=\"shell\">\/usr\/lib64\/libreoffice\/program\/soffice.bin X11 error: Can't open display:\n   Set DISPLAY environment variable, use -display option\n   or check permissions of your X-Server\n   (See \"man X\" resp. \"man xhost\" for details)\n<\/code><\/pre>\n<p>\u53ea\u9700\u8981 yum install libreoffice-headless\uff0c\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5office\u5957\u4ef6 yum install libreoffice \u8f6c\u6362\u811a\u672c soffice &#8211;headl &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.adebug.com\/?p=16\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cLinux\u4e0boffice(doc,docx,xls,xlsx,ppt,pptx)\u8f6cpdf\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.adebug.com\/index.php?rest_route=\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.adebug.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.adebug.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.adebug.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.adebug.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16"}],"version-history":[{"count":1,"href":"http:\/\/www.adebug.com\/index.php?rest_route=\/wp\/v2\/posts\/16\/revisions"}],"predecessor-version":[{"id":17,"href":"http:\/\/www.adebug.com\/index.php?rest_route=\/wp\/v2\/posts\/16\/revisions\/17"}],"wp:attachment":[{"href":"http:\/\/www.adebug.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.adebug.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.adebug.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}