{"id":304,"date":"2017-12-07T09:20:59","date_gmt":"2017-12-07T00:20:59","guid":{"rendered":"https:\/\/jidouka.work\/?p=304"},"modified":"2017-12-18T15:49:01","modified_gmt":"2017-12-18T06:49:01","slug":"pdftk%e3%81%ae%e7%b0%a1%e5%8d%98%e3%81%aa%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%a8pdf%e3%81%ae%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/jidouka.work\/?p=304","title":{"rendered":"pdftk\u306e\u7c21\u5358\u306a\u4f7f\u3044\u65b9\u3068PDF\u306e\u64cd\u4f5c"},"content":{"rendered":"<p>pdftk\u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306ePDF\u306e\u7de8\u96c6\u3092\u884c\u3048\u308b\u9ad8\u6a5f\u80fd\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b\u3088\u308bPDF\u64cd\u4f5c\u3092\u884c\u3048\u3070\u308f\u3056\u308f\u3056\u91cd\u3044PDF\u7de8\u96c6\u30a2\u30d7\u30ea\u3092\u7acb\u3061\u4e0a\u3052\u306a\u304f\u3068\u3082PDF\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3001\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066PDF\u3092\u51e6\u7406\u3059\u308b\u3088\u3046\u306b\u3059\u308c\u3070\u8907\u6570\u306ePDF\u30d5\u30a1\u30a4\u30eb\u3092\u77ed\u6642\u9593\u3067\u30df\u30b9\u306a\u304f\u7de8\u96c6\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067PDF\u64cd\u4f5c\u306e\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3067\u3042\u308bpdftk\u306fWindows, Mac, Linux\u7528\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5148<br \/>\n<a href=\"https:\/\/www.pdflabs.com\/tools\/pdftk-the-pdf-toolkit\/\">PDFtk &#8211; The PDF Toolkit<\/a><\/p>\n<p>pdftk\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u81ea\u52d5\u7684\u306b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306epdftk\u306e\u30d1\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u308b\u305f\u3081\u3001\u3069\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304b\u3089\u3082\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306fpdftk\u3092\u7528\u3044\u305f\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2 id=\"pdf-\">PDF\u30d5\u30a1\u30a4\u30eb\u306e\u7d50\u5408<\/h2>\n<p>pdf1.pdf\u3068pdf2.pdf\u3092\u7d50\u5408\u3057\u3066combined.pdf\u3092\u751f\u6210<\/p>\n<figure class=\"jd-code\"><button type=\"button\" class=\"jd-code-copy\">\u30b3\u30d4\u30fc<\/button><pre><code class=\"language-plaintext\">&lt;code&gt;pdftk pdf1.pdf pdf2.pdf cat output combined.pdf\r\n&lt;\/code&gt;<\/code><\/pre><\/figure>\n<h2 id=\"-\">\u30da\u30fc\u30b8\u306e\u633f\u5165<\/h2>\n<p>pdf_original.pdf\u306e3\u30da\u30fc\u30b8\u76ee\u306binsert.pdf\u3092\u633f\u5165\u3057\u3066output.pdf\u3092\u751f\u6210<\/p>\n<figure class=\"jd-code\"><button type=\"button\" class=\"jd-code-copy\">\u30b3\u30d4\u30fc<\/button><pre><code class=\"language-plaintext\">&lt;code&gt;pdftk A=pdf_original.pdf B=insert.pdf cat A1-2 B A3-end output output.pdf\r\n&lt;\/code&gt;<\/code><\/pre><\/figure>\n<p>\u7a7a\u30da\u30fc\u30b8\u3092\u633f\u5165\u3059\u308b\u3068\u304d\u306f\u5225\u9014\u30d6\u30e9\u30f3\u30af\u306epdf\u3092\u7528\u610f\u3057\u3066\u540c\u69d8\u306e\u65b9\u6cd5\u3067\u767d\u7d19\u306e\u633f\u5165\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2 id=\"-\">\u30da\u30fc\u30b8\u306e\u524a\u9664<\/h2>\n<p>pdf_original.pdf\u306e3\u30da\u30fc\u30b8\u76ee\u3092\u98db\u3070\u3057\u3066output.pdf\u3092\u751f\u6210<\/p>\n<figure class=\"jd-code\"><button type=\"button\" class=\"jd-code-copy\">\u30b3\u30d4\u30fc<\/button><pre><code class=\"language-plaintext\">&lt;code&gt;pdftk pdf_original.pdf cat 1-2 4-end output output.pdf\r\n&lt;\/code&gt;<\/code><\/pre><\/figure>\n<p>\u5143\u306ePDF\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u3092\u524a\u9664\u3059\u308b\u3068\u3044\u3063\u305f\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u65b0\u3057\u3044PDF\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u3068\u304d\u306b\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u306e\u307f\u3092\u542b\u3081\u308b\u3068\u3044\u3063\u305f\u6307\u5b9a\u65b9\u6cd5\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2 id=\"-\">\u30da\u30fc\u30b8\u306e\u5165\u308c\u66ff\u3048<\/h2>\n<p>pdf_original.pdf\u306e2\u30da\u30fc\u30b8\u76ee\u30683\u30da\u30fc\u30b8\u76ee\u3092\u5165\u308c\u66ff\u3048\u3066output.pdf\u3092\u751f\u6210<\/p>\n<figure class=\"jd-code\"><button type=\"button\" class=\"jd-code-copy\">\u30b3\u30d4\u30fc<\/button><pre><code class=\"language-plaintext\">&lt;code&gt;pdftk pdf_original.pdf cat 1 3 2 4-end output output.pdf\r\n&lt;\/code&gt;<\/code><\/pre><\/figure>\n<p>\u5143\u306ePDF\u30d5\u30a1\u30a4\u30eb\u306e\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u3092\u5165\u308c\u66ff\u3048\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u65b0\u3057\u3044PDF\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u3068\u304d\u306b\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u306e\u307f\u9806\u756a\u3092\u6307\u5b9a\u3057\u3066\u65b0\u3057\u3044PDF\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u65b9\u6cd5\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2 id=\"-\">\u30da\u30fc\u30b8\u306e\u56de\u8ee2<\/h2>\n<p>pdf_original.pdf\u306e1\u30da\u30fc\u30b8\u76ee\u3092\u53f3\uff0890\u5ea6\uff09\u306b\u56de\u8ee2\u3057\u3066output.pdf\u3092\u751f\u6210<\/p>\n<figure class=\"jd-code\"><button type=\"button\" class=\"jd-code-copy\">\u30b3\u30d4\u30fc<\/button><pre><code class=\"language-plaintext\">&lt;code&gt;pdftk pdf_original.pdf cat 1right 2-end output output.pdf\r\n&lt;\/code&gt;<\/code><\/pre><\/figure>\n<p>\u56de\u8ee2\u3092\u6307\u5b9a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002\u53f3\u5074\u306e\u6570\u5024\u306f\u56de\u8ee2\u3059\u308b\u89d2\u5ea6\u3002<br \/>\nnorth: 0, east: 90, south: 180, west: 270, left: -90, right: +90, down: +180. left, right, and down<\/p>\n<h2 id=\"-\">\u80cc\u666f\u3001\u30b9\u30bf\u30f3\u30d7\u306e\u8ffd\u52a0<\/h2>\n<p>original.pdf\u306bwatermark.pdf\u306e\u5185\u5bb9\u3092\u80cc\u666f\u3068\u3057\u3066\u8ffd\u52a0\u3057\u3066output.pdf\u3068\u3057\u3066\u51fa\u529b<\/p>\n<figure class=\"jd-code\"><button type=\"button\" class=\"jd-code-copy\">\u30b3\u30d4\u30fc<\/button><pre><code class=\"language-plaintext\">&lt;code&gt; pdftk pdf_original.pdf background watermark.pdf output output.pdf\r\n&lt;\/code&gt;<\/code><\/pre><\/figure>\n<p>original.pdf\u306bwatermark.pdf\u306e\u5185\u5bb9\u3092\u30b9\u30bf\u30f3\u30d7\u3068\u3057\u3066\u8ffd\u52a0\uff08\u524d\u9762\u306b\u8ffd\u52a0\uff09\u3057\u3066output.pdf\u3068\u3057\u3066\u51fa\u529b<\/p>\n<figure class=\"jd-code\"><button type=\"button\" class=\"jd-code-copy\">\u30b3\u30d4\u30fc<\/button><pre><code class=\"language-plaintext\">&lt;code&gt; pdftk pdf_original.pdf stamp watermark.pdf output output.pdf\r\n&lt;\/code&gt;<\/code><\/pre><\/figure>\n<p>\u5408\u6210\u3059\u308b\u80cc\u666f\u3001\u30b9\u30bf\u30f3\u30d7\u306f\u3042\u3089\u304b\u3058\u3081PDF\u3068\u3057\u3066\u4f5c\u6210\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2 id=\"pdf-\">PDF\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u89e3\u9664<\/h2>\n<figure class=\"jd-code\"><button type=\"button\" class=\"jd-code-copy\">\u30b3\u30d4\u30fc<\/button><pre><code class=\"language-plaintext\">&lt;code&gt; pdftk protected.pdf input_pw testpass output unlocked.pdf\r\n&lt;\/code&gt;<\/code><\/pre><\/figure>\n<p>input_pw\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30d1\u30b9\u30ef\u30fc\u30c9\u30ed\u30c3\u30af\u306e\u304b\u304b\u3063\u3066\u3044\u306a\u3044PDF\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2 id=\"-\">\u30da\u30fc\u30b8\u306e\u5206\u89e3<\/h2>\n<p><code>pdftk pdf_original.pdf burst output bursted_pdf%02d.pdf<\/code><\/p>\n<p>\u6307\u5b9a\u3057\u305fPDF\u306e\u30da\u30fc\u30b8\u3092\uff11\u30da\u30fc\u30b8\u305a\u3064\u30d0\u30e9\u30d0\u30e9\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<h2 id=\"-\">\u7a7a\u30da\u30fc\u30b8\u306e\u633f\u5165<\/h2>\n<p>\u4e88\u3081\u767d\u7d19\uff08\u30d6\u30e9\u30f3\u30af\uff09\u306epdf\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u306e\u4e0a\u3067\u4e0a\u8ff0\u306e\u65b9\u6cd5\u3067\u633f\u5165\u3057\u305f\u3044\u30da\u30fc\u30b8\u306b\u633f\u5165\u3002<\/p>\n<h2 id=\"-\">\u30c6\u30ad\u30b9\u30c8\u306e\u62bd\u51fa<\/h2>\n<p>pdftk\u306e\u307f\u3067\u306f\u3067\u304d\u307e\u305b\u3093\u3002pdftotext\u304c\u5fc5\u8981\u3002<\/p>\n<h2 id=\"-\">\u753b\u50cf\u3078\u306e\u5909\u63db<\/h2>\n<p>pdftk\u306e\u307f\u3067\u306f\u3067\u304d\u307e\u305b\u3093\u3002pdfimages\u304c\u5fc5\u8981\u3002<\/p>\n<h2 id=\"-\">\u30da\u30fc\u30b8\u756a\u53f7\u3092\u8ffd\u52a0<\/h2>\n<p>pdftk\u306e\u307f\u3067\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u4e88\u3081\u30da\u30fc\u30b8\u756a\u53f7\u306e\u307f\u5165\u3063\u3066\u3044\u308bPDF\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u305f\u4e0a\u3067\u5404\u30da\u30fc\u30b8\u306e\u80cc\u666f\u304b\u524d\u9762\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>pdftk\u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306ePDF\u306e\u7de8\u96c6\u3092\u884c\u3048\u308b\u9ad8\u6a5f\u80fd\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002 \u30b3\u30de\u30f3\u30c9\u30e9 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":306,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[6,21],"class_list":["post-304","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mac","category-windows","tag-pdf","tag-pdftk"],"_links":{"self":[{"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304"}],"version-history":[{"count":6,"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions"}],"predecessor-version":[{"id":326,"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions\/326"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=\/wp\/v2\/media\/306"}],"wp:attachment":[{"href":"https:\/\/jidouka.work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jidouka.work\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}