Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ついに、Webアプリでの帳票印刷のベストプラクティスを編み出しました💡

 ついに、Webアプリでの帳票印刷のベストプラクティスを編み出しました💡

PHPカンファレンス 2021 1週間前イベント 〜 帰ってきたPHP勉強会@東京 の発表資料です。
https://phpcon.connpass.com/event/224128/

Takashi Kanemoto

September 24, 2021
Tweet

More Decks by Takashi Kanemoto

Other Decks in Programming

Transcript

  1. / 72 1 Web 💡 2 021 / 09 /

    2 4 #phpcon 2 0 2 1 #phpstudy @ttskch
  2. / 72 ( ) CTO 2 60 5000 27 💪

    Symfony 2 Web CTO Zenn Symfony Angular 3 @ttskch 2012 / 0 1 2015 / 1 2 2020 / 0 4
  3. / 72 1 . HTML/CSS PDF 2 . Excel LibreO

    ff i ce PDF 3 . SVF 4 🔖
  4. / 72 1 . HTML/CSS PDF 2 . Excel LibreO

    ff i ce PDF 3 . SVF 5 🔖
  5. / 72 1 . HTML/CSS PDF 2 . Excel LibreO

    ff i ce PDF 3 . SVF 12 🔖
  6. <table> <tr> <td colspan="4"></td> <th></th> <td></td> </tr> <tr> <th rowspan="3"></th>

    <td colspan="3"></td> <td colspan="2"></td> </tr> <tr> <td rowspan="2" colspan="3"></td> </tr> <tr> <td colspan="2"></td> </tr> <tr> <th rowspan="5"></th> <td colspan="2"></td> <td rowspan="4"></td> <th></th> <td></td> </tr> <tr> <td rowspan="3" colspan="2"></td> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <td></td> <td colspan="2"></td> <th></th> <td></td> </tr> </table> HTML
  7. <table> <tr> <td colspan="4"></td> <th></th> <td></td> </tr> <tr> <th rowspan="3"></th>

    <td colspan="3"></td> <td colspan="2"></td> </tr> <tr> <td rowspan="2" colspan="3"></td> </tr> <tr> <td colspan="2"></td> </tr> <tr> <th rowspan="5"></th> <td colspan="2"></td> <td rowspan="4"></td> <th></th> <td></td> </tr> <tr> <td rowspan="3" colspan="2"></td> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <td></td> <td colspan="2"></td> <th></th> <td></td> </tr> </table> HTML rowspan colspan ⾒ td 🙄
  8. / 72 1 
 19 
 <table> <tr> <td colspan="4"></td>

    <th></th> <td></td> </tr> <tr> <th rowspan="3"></th> <td colspan="3"></td> <td colspan="2"></td> </tr> <tr> <td rowspan="2" colspan="3"></td> </tr> <tr> <td colspan="2"></td> </tr> <tr> <th rowspan="5"></th> <td colspan="2"></td> <td rowspan="4"></td> <th></th> <td></td> </tr> <tr> <td rowspan="3" colspan="2"></td> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <td></td> <td colspan="2"></td> <th></th> <td></td> </tr> </table> <table> <tr> <td colspan="4"></td> <th></th> <td></td> </tr> <tr> <th rowspan="3"></th> <td colspan="3"></td> <td colspan="2"></td> </tr> <tr> <td rowspan="2" colspan="3"></td> </tr> <tr> <td colspan="2"></td> </tr> <tr> <th rowspan="5"></th> <td colspan="2"></td> <td rowspan="4"></td> <th></th> <td></td> </tr> <tr> <td rowspan="3" colspan="2"></td> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <td></td> <td colspan="2"></td> <th></th> <td></td> </tr> </table> <table> <tr> <td colspan="4"></td> <th></th> <td></td> </tr> <tr> <th rowspan="3"></th> <td colspan="3"></td> <td colspan="2"></td> </tr> <tr> <td rowspan="2" colspan="3"></td> </tr> <tr> <td colspan="2"></td> </tr> <tr> <th rowspan="5"></th> <td colspan="2"></td> <td rowspan="4"></td> <th></th> <td></td> </tr> <tr> <td rowspan="3" colspan="2"></td> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <td></td> <td colspan="2"></td> <th></th> <td></td> </tr> </table> <table> <tr> <td colspan="4"></td> <th></th> <td></td> </tr> <tr> <th rowspan="3"></th> <td colspan="3"></td> <td colspan="2"></td> </tr> <tr> <td rowspan="2" colspan="3"></td> </tr> <tr> <td colspan="2"></td> </tr> <tr> <th rowspan="5"></th> <td colspan="2"></td> <td rowspan="4"></td> <th></th> <td></td> </tr> <tr> <td rowspan="3" colspan="2"></td> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <th></th> <td></td> </tr> <tr> <td></td> <td colspan="2"></td> <th></th> <td></td> </tr> </table>
  9. / 72 1 . HTML/CSS PDF 2 . Excel LibreO

    ff i ce PDF 3 . SVF 21 🔖
  10. / 72 23 PDF LibreO ffi ce OpenO ff i

    ce OSS CLI Excel PDF https://qiita.com/hirohiro 77 /items/ 942 eb 46 1 e 8 f 47 27 e 4 b 38
  11. / 72 24 PDF LibreO ffi ce OpenO ff i

    ce OSS CLI Excel PDF https://qiita.com/hirohiro 77 /items/ 942 eb 46 1 e 8 f 47 27 e 4 b 38
  12. / 72 1 . HTML/CSS PDF 2 . Excel LibreO

    ff i ce PDF 3 . SVF 29 🔖
  13. / 72 1 . HTML/CSS PDF 2 . Excel LibreO

    ff i ce PDF 3 . SVF 35 🔖
  14. / 72 38 1 . Adobe XD Figma 2 .

    % % 3 . SVG 4 . SVG HTML <svg> 5 . CSS 6 . SVG
  15. / 72 39 1 . Adobe XD Figma 2 .

    % % 3 . SVG 4 . SVG HTML <svg> 5 . CSS 6 . SVG
  16. / 72 45 1 . Adobe XD Figma 2 .

    % % 3 . SVG 4 . SVG HTML <svg> 5 . CSS 6 . SVG
  17. / 72 50 CSS https://blog.ttskch.com/web-app-pdf-printing-best-practice/ @page { size: A4 portrait;

    margin: 0; } * { margin: 0; padding: 0; user-select: none; } body { width: 210mm; color-adjust: exact; > svg { width: 210mm; height: 295.5mm; page-break-after: always; } } @media screen { body { background: #ccc; margin: 0 auto; > svg { background: #fff; box-shadow: 0 .5mm 2mm rgba(0,0,0,.3); margin-top: 5mm; } } }
  18. / 72 53 1 . Adobe XD Figma 2 .

    % % 3 . SVG 4 . SVG HTML <svg> 5 . CSS 6 . SVG
  19. / 72 1 . HTML/CSS PDF 2 . Excel LibreO

    ff i ce PDF 3 . SVF 65 🔖