|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + |
| 4 | +<head> |
| 5 | + <meta charset="UTF-8" /> |
| 6 | + <!--link rel="stylesheet" href="../../assets/base.css"/--> |
| 7 | + <script defer |
| 8 | + data-preloader='true' |
| 9 | + data-preloader-target='[html2pdf-preloader]' |
| 10 | + data-preloader-background='#F2F5F9' |
| 11 | + data-forced-page-break-selectors='' |
| 12 | + data-page-break-after-selectors='' |
| 13 | + data-page-break-before-selectors='H1 H2' |
| 14 | + data-no-break-selectors='.html2pdf4doc-no-break' |
| 15 | + data-no-hanging-selectors='.html2pdf4doc-no-hanging' |
| 16 | + src="../../../html2pdf4doc/html2pdf4doc_js/html2pdf4doc.min.js"></script> |
| 17 | + <title>EXAMPLE - PDF</title> |
| 18 | +</head> |
| 19 | + |
| 20 | +<body style="padding: 1rem; background: #e3c8bd;"> |
| 21 | + <main style="padding: .5rem; border: 1px dotted;"> |
| 22 | + <p style="text-align: center">Nothing except the <code>[html2pdf]</code> element is printed. |
| 23 | + <br>Only what is visible on the sheets is printed: |
| 24 | + </p> |
| 25 | + <div html2pdf-preloader class="main"> |
| 26 | + |
| 27 | + <!-- printed element start --> |
| 28 | + <div html2pdf class="content"> |
| 29 | + <h1>EXAMPLE</h1> |
| 30 | + <p>This image is in <code>/_assets</code>:</p> |
| 31 | + <p> |
| 32 | + <img alt="copy a stable link" class="image" src="_assets/image-placeholder.jpg" style="max-width: 100%;" /> |
| 33 | + </p> |
| 34 | + <p>Some test.</p> |
| 35 | + </div> |
| 36 | + <!-- // printed element end --> |
| 37 | + |
| 38 | + </div> |
| 39 | + <style html2pdf-frontpage-style> |
| 40 | + .html2pdf-frontpage-grid { |
| 41 | + display: grid; |
| 42 | + height: 100%; |
| 43 | + } |
| 44 | + |
| 45 | + .html2pdf-frontpage-grid-middle { |
| 46 | + display: flex; |
| 47 | + align-items: center; |
| 48 | + justify-content: center; |
| 49 | + text-align: center; |
| 50 | + } |
| 51 | + |
| 52 | + .html2pdf-frontpage-grid-top, |
| 53 | + .html2pdf-frontpage-grid-bottom { |
| 54 | + display: flex; |
| 55 | + justify-content: center; |
| 56 | + align-items: center; |
| 57 | + } |
| 58 | + </style> |
| 59 | + <template html2pdf-frontpage> |
| 60 | + <div class="html2pdf-frontpage-grid"> |
| 61 | + <div class="html2pdf-frontpage-grid-top">➰</div> |
| 62 | + <div class="html2pdf-frontpage-grid-middle"> |
| 63 | + <h1 data-testid="document-title">EXAMPLE</h1> |
| 64 | + </div> |
| 65 | + <div class="html2pdf-frontpage-grid-bottom">➿</div> |
| 66 | + </div> |
| 67 | + </template> |
| 68 | + <style html2pdf-header-style> |
| 69 | + html2pdf-header { |
| 70 | + padding-top: 0; |
| 71 | + } |
| 72 | + |
| 73 | + .html2pdf-header { |
| 74 | + display: flex; |
| 75 | + justify-content: space-between; |
| 76 | + align-items: flex-end; |
| 77 | + column-gap: 32px; |
| 78 | + font-size: small; |
| 79 | + line-height: 1; |
| 80 | + color: rgba(0, 0, 0, 0.5); |
| 81 | + border-bottom: 1px solid rgba(0, 0, 0, 0.25); |
| 82 | + padding-bottom: 8px; |
| 83 | + } |
| 84 | + |
| 85 | + .html2pdf-header-left { |
| 86 | + text-align: left; |
| 87 | + flex-shrink: 0; |
| 88 | + } |
| 89 | + |
| 90 | + .html2pdf-header-right { |
| 91 | + text-align: right; |
| 92 | + font-weight: bold; |
| 93 | + } |
| 94 | + </style> |
| 95 | + <template html2pdf-header> |
| 96 | + <div class="html2pdf-header"> |
| 97 | + <div class="html2pdf-header-left">Documentation</div> |
| 98 | + <div class="html2pdf-header-right">EXAMPLE</div> |
| 99 | + </div> |
| 100 | + </template> |
| 101 | + <style html2pdf-footer-style> |
| 102 | + html2pdf-footer { |
| 103 | + padding-bottom: 0; |
| 104 | + } |
| 105 | + |
| 106 | + .html2pdf-footer { |
| 107 | + display: flex; |
| 108 | + justify-content: space-between; |
| 109 | + column-gap: 16px; |
| 110 | + font-size: small; |
| 111 | + line-height: 1; |
| 112 | + color: rgba(0, 0, 0, 0.5); |
| 113 | + border-top: 1px solid rgba(0, 0, 0, 0.25); |
| 114 | + padding-top: 8px; |
| 115 | + } |
| 116 | + |
| 117 | + .html2pdf-footer-left { |
| 118 | + text-align: left; |
| 119 | + } |
| 120 | + |
| 121 | + .html2pdf-footer-right { |
| 122 | + text-align: right; |
| 123 | + } |
| 124 | + |
| 125 | + .html2pdf-header-page_placeholder { |
| 126 | + width: 54px; |
| 127 | + /* max for pattern 888/888 */ |
| 128 | + flex-shrink: 0; |
| 129 | + text-indent: -10000px; |
| 130 | + } |
| 131 | + </style> |
| 132 | + <template html2pdf-footer> |
| 133 | + <div html2pdf-page-number> |
| 134 | + <span html2pdf-page-number-current></span>/<span html2pdf-page-number-total></span> |
| 135 | + </div> |
| 136 | + <div class="html2pdf-footer"> |
| 137 | + <div class="html2pdf-footer-left">2025-09-27</div> |
| 138 | + <div class="html2pdf-footer-right"></div> |
| 139 | + <div class="html2pdf-header-page_placeholder"></div> |
| 140 | + </div> |
| 141 | + </template> |
| 142 | + </main> |
| 143 | +</body> |
| 144 | + |
| 145 | +</html> |
0 commit comments