Delivery Route Manifest
A courier's last-mile route sheet for a morning wave: the paper record a driver carries alongside the handheld, reconciled at the depot at the end of the route.
- Route, driver and vehicle. Route number, depot, distance and dispatch phone; the driver, van and sign-on time; and a QR code that opens the live route board.
- Stops in run order. A table driven by
source, each stop with its time window, consignee, address, tracking number in monospace, pieces and service flags. - A door-scan QR for every stop. Each row renders its own QR code from the stop's tracking link, so the handheld opens that parcel at the door.
- Route totals. Stops, pieces, priority stops and cash on delivery, in a band above the table and in its closing row.
- An exception legend and an offline notes box. Six codes for delivered, attempted, refused and held stops, and a box for notes when the handheld is offline.
- Three sign-offs. The dispatcher's drawn signature releasing the route, then boxes for the driver at the end of the route and for the depot's reconciliation.
- Plus a courier header, a footer with live page numbers, a faint
ROUTE SHEETwatermark and the legal conditions at the foot.
Features used: PDF/A-2b conformance, watermarks, columns, tables, rules, SVG, barcodes (qrcode), data binding, headers and footers
- Output
- Template
- Data
How it's built
A door-scan QR for every stop
The stop table names $data.stops as its source; its second row carries $item tokens, so it is drawn once per stop, in the order the data lists them. The door-scan cell is nothing but an inline [barcode, qrcode, value, width|height] shortcode reading each stop's tracking URL, so the driver scans the code at the door and the handheld opens that parcel. Trimmed to three of its five columns:
{ "table": { "style": "stopTable", "widths": [0.85, 1.05, 2.9], "source": "$data.stops", "rows": [
[ { "th": "STOP · WINDOW", "style": "th" }, { "th": "DOOR SCAN", "style": "th" }, { "th": "CONSIGNEE · ADDRESS · TRACKING", "style": "th" } ],
[ { "td": "[fontsize, 11][b]$item.seq[/b][/fontsize][br][fontsize, 6.5][color, #9575CD]$item.window[/color][/fontsize]" },
{ "td": "[barcode, qrcode, $item.url, 34|34]" },
{ "td": "[fontsize, 8][b]$item.consignee[/b][/fontsize][br][fontsize, 7]$item.address[/fontsize][br][font, Mono][fontsize, 6.5]$item.tracking[/fontsize][/font]" } ]
] } }
A stop in the data is one object ("seq": "1", "window": "08:00–09:00", "url": "https://swiftline.example/t/SL-88214-D14", …); a tenth stop is a tenth object and nothing in the document changes. The route's own QR, in the identification block above, is the same shortcode on $data.route.url at 58 × 58 pt. See Tables and Barcodes in table cells.
Sign-off boxes
The sign-off row is a three-column table whose cells take sigCell, a bordered box with a minHeight of 62 pt, so a box with nothing but its caption still leaves room to sign. The dispatcher's box nests a borderless table: the drawn signature, then the name and date over a hairline (sigNameCell has only a top border). The driver's box is left blank for the pen. Two of the three cells:
{ "table": { "style": "sigTable", "widths": [1, 1], "rows": [ [
{ "p": "[color, #4A148C][b]DISPATCHER — ROUTE RELEASED[/b][/color]", "style": "sigCell",
"table": { "style": "noBorder", "widths": [1], "rows": [
[ { "style": "sigSvgCell", "svg": { "viewBox": [120, 26], "width": 92, "children": [
{ "path": { "d": "M9 16 C14 4 20 8 19 12 C18 17 25 10 32 14 C38 17 37 20 46 15 C54 10 60 18 69 13 C77 8 86 15 98 12", "style": "sigInk" } },
{ "path": { "d": "M7 20 C36 23 70 21 103 17", "style": "sigInkFine" } } ] } } ],
[ { "td": "$data.signoff.dispatcher[br][fontsize, 6][color, #9575CD]$data.signoff.dispatcherDate[/color][/fontsize]", "style": "sigNameCell" } ]
] } },
{ "p": "[color, #4A148C][b]DRIVER — END OF ROUTE[/b][/color][br, 4][fontsize, 6][color, #9575CD]Sign at depot check-in · record odometer and COD envelope number[/color][/fontsize]", "style": "sigCell" }
] ] } }