Live demos
Browse the sample list on the left and preview layouts plus sample code on the right. Run a demo to print silently or preview PDF via web-print-pdf and the local client. Install and launch the client first.
Client
If results look wrong, install the latest Web Print Expert client from our site first (older builds may cause layout drift).
Layout
Preview and print follow standard HTML/CSS only—no hidden tricks. What you style is what you get.
10 - Multi-page table
One table auto-paginated across ~2 A4 pages (36 rows): table-header-group repeats headers; break-inside: avoid on rows. No split tables—let the engine paginate.
Layout preview
Sample code
const longTableHtml = `<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>演示库存明细表</title>
<style>
html, body { margin: 0; padding: 0; }
.report {
font-family: "Microsoft YaHei", sans-serif;
padding: 16px 20px 20px;
box-sizing: border-box;
color: #1a202c;
}
.report-demo-tag {
margin: 0 0 8px;
font-size: 11px;
color: #a0aec0;
}
.report-title {
margin: 0 0 4px;
font-size: 18px;
text-align: center;
letter-spacing: 2px;
}
.report-meta {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 4px 16px;
margin: 0 0 12px;
font-size: 12px;
color: #4a5568;
}
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 11px;
line-height: 1.4;
}
.data-table thead { display: table-header-group; }
.data-table tfoot { display: table-footer-group; }
.data-table tr { page-break-inside: avoid; break-inside: avoid; }
.data-table th,
.data-table td {
border: 1px solid #cbd5e0;
padding: 5px 6px;
vertical-align: middle;
}
.data-table thead th {
background: #edf2f7;
// …
Result
- Demos load bundled
web-print-pdffirst (same API as npm); CDN is used as fallback. - The client’s built-in Run examples page has more editable demos; this page complements it.
- Utility demos (connection, printer list) return JSON only—no print job.