{"id":182,"date":"2017-11-18T00:47:46","date_gmt":"2017-11-17T15:47:46","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=182"},"modified":"2022-07-14T20:06:27","modified_gmt":"2022-07-14T11:06:27","slug":"laravel-dompdf-%e3%81%8c%e4%bd%bf%e3%81%84%e3%82%84%e3%81%99%e3%81%8f%e3%81%aa%e3%81%a3%e3%81%a6%e3%81%9f%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=182","title":{"rendered":"Laravel-dompdf \u304c\u4f7f\u3044\u3084\u3059\u304f\u306a\u3063\u3066\u305f\u4ef6"},"content":{"rendered":"<p>\u3044\u308d\u3044\u308d\u3068\u3084\u308b\u3053\u3068\u304c\u591a\u304f\u3066\u3064\u3044\u30d6\u30ed\u30b0\u3092\u30b5\u30dc\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\uff08\u6c57\uff09<\/p>\n<p>\u73fe\u5728\u306e\u958b\u767a\u3067 PDF\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u306e\u3067\u3001<code>Laravel<\/code>\u958b\u767a\u3067\u306f\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e\u300c<a href=\"https:\/\/github.com\/barryvdh\/laravel-dompdf\">laravel-dompdf<\/a>\u300d\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u4f55\u5ea6\u3082\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u4f7f\u3063\u3066\u3044\u308b\u3093\u3067\u3059\u3051\u3069\u3001\u5b9f\u306f\u65e5\u672c\u8a9e\u3092\u4f7f\u3046\u3068\u306a\u308b\u3068 <code>composer<\/code> \u306e\u30eb\u30fc\u30eb\u3092\u7834\u3063\u305f\u308a\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u81ea\u5206\u3067\u4f5c\u3063\u305f\u308a\u3068\u5c11\u3057\u4f7f\u3044\u306b\u304f\u3044\u3082\u306e\u3067\u3057\u305f\u3002<\/p>\n<p>\u203b\u5b9f\u969b\u306b\u306f<code>laravel-dompdf<\/code>\u3067\u306f\u306a\u304f\u3001\u5143\u3068\u306a\u3063\u3066\u308b<code>dompdf<\/code>\u304c\u539f\u56e0\u3067\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u4eca\u56de\u3082\u307e\u305f\u540c\u3058\u4f5c\u696d\u304c\u5fc5\u8981\u304b\u3068\u601d\u3063\u3066\u3044\u305f\u3089\u3001\u3055\u3059\u304c\u65e5\u9032\u6708\u6b69\u306e\u30a6\u30a7\u30d6\u306e\u4e16\u754c\u3002<\/p>\n<p>\u65b0\u3057\u3044<code>laravel-dompdf<\/code>\u3067\u306f<strong>\u3081\u3093\u3069\u3046\u306a\u4f5c\u696d\u3092\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u307e\u3057\u305f\u3002<\/strong><\/p>\n<p>\u305d\u3053\u3067\uff01\u305d\u306e\u611f\u52d5\u3092\u539f\u52d5\u529b\u306b<code>laravel-dompdf<\/code>\u3067\u65e5\u672c\u8a9e\u3092\u4f7f\u3046\u65b9\u6cd5\u3092\u307e\u3068\u3081\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3344 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22.png\" alt=\"\" width=\"320\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22.png 320w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22-150x150.png 150w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22-300x300.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_22-100x100.png 100w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 7.x\u3001laravel-dompdf 0.8.6<\/p>\n<p><em>\u203b\u3053\u306e\u8a18\u4e8b\u306f\u3001Laravel 5.5\u5411\u3051\u306b\u4f5c\u6210\u3055\u308c\u305f\u5185\u5bb9\u306b\u52a0\u7b46\u4fee\u6b63\u3055\u308c\u305f\u3082\u306e\u3067\u3059\u3002<\/em><\/p>\n<h1>\u307e\u305a\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p>\u307e\u305a\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><strong>composer require barryvdh\/laravel-dompdf\r\n<\/strong><\/pre>\n<p><code>Laravel 5.5<\/code>\u4ee5\u4e0a\u306a\u3089\u9762\u5012\u306a<code>config\/app.php<\/code>\u3078\u306e\u4f5c\u696d\u3082\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002\u30db\u30f3\u30c8\u4fbf\u5229\u306b\u306a\u308a\u307e\u3057\u305f\uff01<\/p>\n<h1>\u30d5\u30a9\u30f3\u30c8\u3092\u6e96\u5099<\/h1>\n<p><code>laravel-dompdf<\/code>\u3092\u4f7f\u3063\u3066\u65e5\u672c\u8a9e\u51fa\u529b\u3092\u3059\u308b\u306b\u306f\u3001\u4ee5\u524d\u3068\u540c\u3058\u304f\u65e5\u672c\u8a9e\u30d5\u30a9\u30f3\u30c8\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u4ee5\u4e0b\u304b\u3089 <strong>IPA\u30d5\u30a9\u30f3\u30c8<\/strong>\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066<code>storage\/fonts<\/code>\u306b\u8a2d\u7f6e\u3057\u307e\u3057\u3087\u3046\u3002\uff08\u30d5\u30a9\u30eb\u30c0\u304c\u306a\u3051\u308c\u3070\u81ea\u5206\u3067\u4f5c\u3063\u3066\u6a29\u9650\u3092<code>777<\/code>\u306b\u5909\u66f4\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"305\" height=\"107\" class=\"alignnone size-full wp-image-6192\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2017\/11\/dompdf_2.png\" alt=\"\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2017\/11\/dompdf_2.png 305w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2017\/11\/dompdf_2-300x105.png 300w\" sizes=\"auto, (max-width: 305px) 100vw, 305px\" \/><\/p>\n<p>\u203b<code>storage\/app\/fonts<\/code>\u3067\u306f\u306a\u3044\u306e\u3067\u6ce8\u610f\uff01<\/p>\n<p>\u3010\u30d5\u30a9\u30f3\u30c8\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9URL\u3011<br \/>\n<a href=\"https:\/\/moji.or.jp\/ipafont\/ipafontdownload\/\">https:\/\/moji.or.jp\/ipafont\/ipafontdownload\/<\/a><\/p>\n<h1>\u30d3\u30e5\u30fc\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<\/h1>\n<p>\u30d5\u30a9\u30f3\u30c8\u306e\u8a2d\u7f6e\u304c\u7d42\u308f\u3063\u305f\u3089\u3001\u6b21\u306f<strong>\u30d3\u30e5\u30fc<\/strong>\u3068<strong>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<\/strong>\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n\u307e\u305a\u306fPDF\u3067\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u3055\u308c\u308b<strong>\u30d3\u30e5\u30fc<\/strong>\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u203b\u30c6\u30b9\u30c8\u7684\u306b\u66f8\u3044\u3066\u3044\u308b\u306e\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u306a\u3069\u306f\u304a\u597d\u307f\u3067\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong><code>\/resources\/views\/generate_pdf.blade.php<\/code><\/strong><\/p>\n<pre>&lt;!doctype html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\"\/&gt;\r\n    &lt;style type=\"text\/css\"&gt;\r\n        @font-face {\r\n            font-family: ipag;\r\n            font-style: normal;\r\n            font-weight: normal;\r\n            src: url('{{ storage_path('fonts\/ipag.ttf') }}') format('truetype');\r\n        }\r\n        @font-face {\r\n            font-family: ipag;\r\n            font-style: bold;\r\n            font-weight: bold;\r\n            src: url('{{ storage_path('fonts\/ipag.ttf') }}') format('truetype');\r\n        }\r\n        body {\r\n            font-family: ipag !important;\r\n        }\r\n    &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\u65e5\u672c\u8a9e\u306e\u8868\u793a\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u6ce8\u610f\u3059\u3079\u304d\u70b9\u306f\u3001<code>@font-face<\/code>\u306e\u90e8\u5206\u3067\u3059\u3002<br \/>\n\u3053\u3053\u306b\u6307\u5b9a\u3057\u305f\u30d5\u30a9\u30f3\u30c8\u304c PDF\u3067\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001<code>@font-face<\/code>\u304c\uff12\u3064\u3042\u308b\u306e\u306f\u901a\u5e38\u306e\u6587\u5b57\u3068\u3001\u592a\u5b57\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u3067\u3059\u3002<br \/>\n\uff08\u6700\u521d\u305a\u3063\u3068\u8868\u793a\u3067\u304d\u306a\u3044\u306a\u3068\u601d\u3063\u3066\u3044\u305f\u3089\u592a\u6587\u5b57\u3092\u6307\u5b9a\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u7f60\u306b\u30cf\u30de\u3063\u3066\u3044\u307e\u3057\u305f\ud83d\ude05\uff09<\/p>\n<p>\u305d\u3057\u3066\u3001<code>body<\/code>\u306b\u3082<code>font-family<\/code>\u3067\u6307\u5b9a\u3057\u3066\u5ff5\u306e\u70ba<code>!important<\/code>\u3067\u5f37\u8abf\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001<code>meta<\/code>\u306b\u3082<code>utf-8<\/code>\u3092\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304f\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u308c\u3067<strong>\u30d3\u30e5\u30fc<\/strong>\u306fOK\u3067\u3059\uff01<\/p>\n<h1>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<\/h1>\n<p>\u6b21\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4f5c\u308a\u307e\u3057\u3087\u3046\u3002<br \/>\n<span style=\"font-size: 1rem;\">\u3053\u308c\u306f\u307b\u307c\u5b9a\u578b\u6587\u3067\u3059\u306d\u3002<\/span><\/p>\n<p><strong><code>\/app\/Http\/Controllers\/HomeController.php<\/code><\/strong><\/p>\n<pre>class HomeController extends Controller\r\n{\r\n    <strong>public function generate_pdf() {\r\n\r\n        $pdf = \\PDF::loadView('generate_pdf');\r\n        return $pdf-&gt;stream('title.pdf');\r\n\r\n    }\r\n\r\n<\/strong>    \/\/ \u7701\u7565<\/pre>\n<p>\u5185\u5bb9\u3068\u3057\u3066\u306f\u3001\u5148\u307b\u3069\u306e\u30d3\u30e5\u30fc\u3092 <strong>loadView()<\/strong>\u3067\u8aad\u307f\u8fbc\u3093\u3067\u3001\u5f8c\u306f <strong>stream()<\/strong>\u3092\u547c\u3076\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\uff08\u306a\u304a\u3001\u3053\u306e\u3068\u304d\u306b <strong>laravel-dompdf<\/strong> \u304c\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u3067\u4f5c\u6210\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u306a\u3093\u3066\u6709\u80fd\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306a\u3093\u3067\u3057\u3087\u3046\uff01\uff09<\/p>\n<p>\u305d\u3057\u3066\u3001PDF\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u3044\u5834\u5408\u306f\u3001<code>return<\/code>\u90e8\u5206\u3092\u3001<\/p>\n<pre><strong>return $pdf-&gt;download('title.pdf');<\/strong><\/pre>\n<p>\u306b\u3059\u308b\u3060\u3051\u3067OK\uff01<br \/>\n\u697d\u3061\u3093\u3067\u3059\u306d\ud83d\ude0a\u2728<\/p>\n<h1>\u30c6\u30fc\u30d6\u30eb\u5185\u3067\u9577\u3044\u6587\u7ae0\u3092\u81ea\u52d5\u3067\u6298\u308a\u8fd4\u3059\u65b9\u6cd5<\/h1>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2019.11.26\u3011<\/strong>dompdf 0.8.3<\/p>\n<p>\u9577\u3044\u6587\u7ae0\u3092\u30c6\u30fc\u30d6\u30eb\u5185\u3067\u6298\u308a\u8fd4\u3059\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>td<\/code>\u30bf\u30b0\u306b<code>word-break<\/code>, <code>word-wrap<\/code>\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong><code>\/resources\/views\/generate_pdf.blade.php<\/code><\/strong><\/p>\n<pre>&lt;!doctype html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\"\/&gt;\r\n    &lt;style&gt;\r\n\r\n        <strong>@font-face {<\/strong>\r\n<strong>            font-family: ipag;<\/strong>\r\n<strong>            font-style: normal;<\/strong>\r\n<strong>            font-weight: normal;<\/strong>\r\n<strong>            src: url('{{ storage_path('fonts\/ipag.ttf') }}') format('truetype');<\/strong>\r\n<strong>        }<\/strong>\r\n<strong>        body {<\/strong>\r\n<strong>            font-family: ipag !important;<\/strong>\r\n<strong>        }<\/strong>\r\n<strong>        table {<\/strong>\r\n<strong>            border-collapse: collapse;<\/strong>\r\n<strong>            width: 100%;<\/strong>\r\n<strong>        }<\/strong>\r\n<strong>        td {<\/strong>\r\n<strong>            border:1px solid #000;<\/strong>\r\n<strong>            word-break:break-all;<\/strong>\r\n<strong>            word-wrap:break-word;<\/strong>\r\n<strong>        }<\/strong>\r\n\r\n    &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div&gt;\r\n    &lt;table&gt;\r\n        &lt;tr&gt;\r\n            <strong>&lt;td style=\"width:50%;\"&gt;<\/strong>\r\n                <strong>&lt;div style=\"padding:15px;\"&gt;<\/strong>\r\n                    \u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\u30c6\u30b9\u30c8\r\n                &lt;\/div&gt;\r\n            &lt;\/td&gt;\r\n            &lt;td&gt;test&lt;\/td&gt;\r\n            &lt;td&gt;test&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;\r\n            &lt;td&gt;test&lt;\/td&gt;\r\n            &lt;td&gt;test&lt;\/td&gt;\r\n            &lt;td&gt;test&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;\r\n            &lt;td&gt;test&lt;\/td&gt;\r\n            &lt;td&gt;test&lt;\/td&gt;\r\n            &lt;td&gt;test&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n    &lt;\/table&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3057\u305f\u3082\u306e\u304c\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5141\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2017\/11\/dompdf_1.png\" alt=\"\" width=\"739\" height=\"179\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2017\/11\/dompdf_1.png 739w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2017\/11\/dompdf_1-300x73.png 300w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><\/p>\n<h1>\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b<\/h1>\n<p><em>\u3010\u8ffd\u8a18\uff1a2020.3.12\u3011<\/em><\/p>\n<p><code>dompdf<\/code>\u3067\u306f\u69d8\u3005\u306a\u8a2d\u5b9a\u304c\u5909\u66f4\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan vendor:publish --provider=\"Barryvdh\\DomPDF\\ServiceProvider\"<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u300c<strong>config\/dompdf.php<\/strong>\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u3053\u306e\u4e2d\u3067\u8a2d\u5b9a\u3092\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"295\" height=\"232\" class=\"alignnone size-full wp-image-6193\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2017\/11\/dompdf_3.png\" alt=\"\" \/><\/p>\n<p>\u3067\u306f\u3001\u3072\u3068\u3064\u305a\u3064\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h2>show_warnings<\/h2>\n<p>\u30a8\u30e9\u30fc\uff08Exception\uff09\u3092\u6709\u52b9\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3002<\/p>\n<h2>orientation<\/h2>\n<p>\u7e26\u9577\u304b\u6a2a\u9577\u306e\u9078\u629e\u3002<\/p>\n<ul>\n<li>\u7e26\u9577\uff1a portrait<\/li>\n<li>\u6a2a\u9577\uff1a landscape<\/li>\n<\/ul>\n<h2>font_dir<\/h2>\n<p>\u30d5\u30a9\u30f3\u30c8\u3092\u8a2d\u7f6e\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u3002<\/p>\n<h2>font_cache<\/h2>\n<p>\u30d5\u30a9\u30f3\u30c8\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u7f6e\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u3002<\/p>\n<h2>temp_dir<\/h2>\n<p>\u4e00\u6642\u7684\u306a\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u3002<\/p>\n<h2>chroot<\/h2>\n<p>\u30eb\u30fc\u30c8\u306e\u30d5\u30a9\u30eb\u30c0\u3002<br \/>\n\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u9650\u5b9a\u3057\u3066\u64cd\u4f5c\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u203b\u8106\u5f31\u6027\u304c\u542b\u307e\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<a href=\"#vulnerability\">PDF\u306e\u8106\u5f31\u6027\u306b\u3064\u3044\u3066<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>enable_font_subsetting<\/h2>\n<p><code>true<\/code>\u306b\u3059\u308b\u3068\u3001\u30d5\u30a9\u30f3\u30c8\u3092\u57cb\u3081\u8fbc\u307e\u306a\u3044PDF\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\uff08\u3064\u307e\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u5c0f\u3055\u304f\u306a\u308a\u307e\u3059\u304c\u3001\u95b2\u89a7\u8005\u306e\u74b0\u5883\u306b\u30d5\u30a9\u30f3\u30c8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff09<\/p>\n<h2>pdf_backend<\/h2>\n<p>\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306b\u5229\u7528\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3002<br \/>\n\u4f7f\u3048\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>PDFLib<\/li>\n<li>CPDF<\/li>\n<li>GD<\/li>\n<li>auto<\/li>\n<\/ul>\n<h2>DOMPDF_PDFLIB_LICENSE<\/h2>\n<p>\u30e9\u30a4\u30bb\u30f3\u30b9\u8868\u8a18\uff08\u5546\u7528<code>PDFlib<\/code>\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306e\u307f\uff09<\/p>\n<h2>default_media_type<\/h2>\n<p>HTML\u306e\u30e1\u30c7\u30a3\u30a2\u30bf\u30a4\u30d7\u3002<br \/>\n\u4f7f\u3048\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>screen<\/li>\n<li>tty<\/li>\n<li>tv<\/li>\n<li>projection<\/li>\n<li>handheld<\/li>\n<li>print<\/li>\n<li>braille<\/li>\n<li>aural<\/li>\n<li>all<\/li>\n<\/ul>\n<h2>default_paper_size<\/h2>\n<p>PDF\u306e\u30b5\u30a4\u30ba\u3002<\/p>\n<h2>default_font<\/h2>\n<p>\u3069\u306e\u30d5\u30a9\u30f3\u30c8\u3092\u4f7f\u3046\u304b\u3002<\/p>\n<h2>dpi<\/h2>\n<p>\u89e3\u50cf\u5ea6\u3002<\/p>\n<h2>enable_php<\/h2>\n<p>PDF\u3067<code>php<\/code>\u3092\u6709\u52b9\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3002<\/p>\n<p>\u203b\u8106\u5f31\u6027\u304c\u542b\u307e\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<a href=\"#vulnerability\">PDF\u306e\u8106\u5f31\u6027\u306b\u3064\u3044\u3066<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>enable_javascript<\/h2>\n<p>PDF\u3067<code>JavaScript<\/code>\u3092\u6709\u52b9\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3002<\/p>\n<p>\u203b\u8106\u5f31\u6027\u304c\u542b\u307e\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<a href=\"#vulnerability\">PDF\u306e\u8106\u5f31\u6027\u306b\u3064\u3044\u3066<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>enable_remote<\/h2>\n<p>\u4f8b\u3048\u3070\u3001<code>&lt;img src=\"http:\/\/example.com\/****\"&gt;<\/code>\u306a\u3069\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306e\u53c2\u7167\u3092\u6709\u52b9\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3002<\/p>\n<p>\u203b\u8106\u5f31\u6027\u304c\u542b\u307e\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<a href=\"#vulnerability\">PDF\u306e\u8106\u5f31\u6027\u306b\u3064\u3044\u3066<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>font_height_ratio<\/h2>\n<p>\u884c\u9593\u306e\u6bd4\u7387\u3002<\/p>\n<h2>enable_html5_parser<\/h2>\n<p><code>HTML5 Lib parser<\/code>\u3092\u6709\u52b9\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3002<\/p>\n<h1>\ud842\udfb7\uff08\u3064\u3061\u3088\u3057\uff09\u306e\u6587\u5b57\u5316\u3051\u3092\u4fee\u6b63\u3059\u308b\u65b9\u6cd5<\/h1>\n<p>\u3053\u3061\u3089\u306b\u3064\u304d\u307e\u3057\u3066\u306f\u3001<code>note<\/code>\u3067\u516c\u958b\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u304b\u3089\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u8a73\u7d30\u30da\u30fc\u30b8\uff1a<\/strong> <a href=\"https:\/\/note.com\/sukohi\/n\/ne0f20e422f3f\">\u3010Laravel\uff0fdompdf\u3011 \ud842\udfb7\uff08\u3064\u3061\u3088\u3057\uff09\u306e\u6587\u5b57\u5316\u3051\u3092\u4fee\u6b63\u3059\u308b\u65b9\u6cd5<\/a><\/p>\n<h1>PDF\u306e\u8106\u5f31\u6027\u306b\u3064\u3044\u3066<\/h1>\n<p><em>\u3010\u8ffd\u8a18\uff1a2020.3.12\u3011<\/em><\/p>\n<p>\u4f8b\u3048\u3070\u3001<code>enable_php<\/code>\u3067PHP\u3092\u6709\u52b9\u306b\u3057\u3001<code>enable_remote<\/code>\u3067\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u306e\u53c2\u7167\u3092\u6709\u52b9\u306b\u3057\u3066\u3057\u307e\u3046\u3068\u3001PDF\u306e\u4e2d\u306b\u300c\u81ea\u7531\u306bPHP\u304c\u5b9f\u884c\u3067\u304d\u308b\u300d\u8106\u5f31\u6027\u304c\u542b\u307e\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001<code>chroot<\/code>\u3092<code>\/<\/code>\u306b\u3057\u305f\u5834\u5408\u3001\u5168\u30d5\u30a9\u30eb\u30c0\u3078\u306e\u6a29\u9650\u304c\u6709\u52b9\u306b\u306a\u308a\u5371\u967a\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3059\u308b\u5834\u5408\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3001\u3044\u3046\u3053\u3068\u3067\u4eca\u56de\u306f\u4f5c\u696d\u304c\u697d\u306b\u306a\u3063\u305f<code>laravel-dompdf<\/code>\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<br \/>\n\u307f\u306a\u3055\u3093\u306e\u958b\u767a\u306e\u304a\u5f79\u306b\u305f\u3066\u305f\u3089\u5149\u6804\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3467 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_9.png\" alt=\"\" width=\"216\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_9.png 216w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_9-203x300.png 203w\" sizes=\"auto, (max-width: 216px) 100vw, 216px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u308d\u3044\u308d\u3068\u3084\u308b\u3053\u3068\u304c\u591a\u304f\u3066\u3064\u3044\u30d6\u30ed\u30b0\u3092\u30b5\u30dc\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\uff08\u6c57\uff09 \u73fe\u5728\u306e\u958b\u767a\u3067 PDF\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u306e\u3067\u3001Laravel\u958b\u767a\u3067\u306f\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e\u300clar &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=182\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel-dompdf \u304c\u4f7f\u3044\u3084\u3059\u304f\u306a\u3063\u3066\u305f\u4ef6&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":6186,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,10],"tags":[22],"class_list":["post-182","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-php","tag-pdf"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=182"}],"version-history":[{"count":35,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":6184,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions\/6184"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/6186"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}