Skip to main content

Product Datasheet

A two-page technical product datasheet. The product's name, description, features, specifications, variants, certifications and ordering codes come from its data file.

  • Hero. On a warm paper tint, the product is drawn in svg (gradients for the body and knobs, a display and a level meter) beside the name in a condensed display face, the tagline and status chips.
  • Headline specifications. Four cards, each led by a stroke icon on a tinted disc, and the features in three cards of lists bound from data under their own icons.
  • Specification and variant tables. They repeat their row over $data.specs and $data.variants, with values set in a monospaced face and every other row shaded by nthChild.
  • Measured performance. Drawn in svg: a frequency response on a logarithmic axis with its tolerance band, battery runtime as bars, and the rear panel.
  • Certifications and ordering codes. Each mark sits in a seal drawn in svg, and the ordering codes are an EAN-13 and a QR code.
  • Document approval. Text fields, a date picker, an inline [signature] field, a choice field and checkboxes.

Features used: PDF/A-2b conformance, columns, tables, lists, SVG, barcodes (ean13, qrcode), form fields (checkbox, choice, datepicker, text), empty signature fields, data binding, headers and footers

How it's built​

Three families, named by role​

The document declares three font families, each with a regular and a bold file, and the styles pick one by fontFamily: Display for the product name, the headline figures and the section headings, Sans for running text, Mono for small labels, table headings, values and the certification marks.

"fonts": {
"Sans": { "regular": "fonts/NotoSans-Regular.ttf", "bold": "fonts/NotoSans-Bold.ttf" },
"Display": { "regular": "fonts/Oswald-Regular.ttf", "bold": "fonts/Oswald-Bold.ttf" },
"Mono": { "regular": "fonts/JetBrainsMono-Regular.ttf", "bold": "fonts/JetBrainsMono-Bold.ttf" }
}

Tables from the data, shaded by nthChild​

The specification table reads $data.specs with source: a header row of th cells, then one row of $item cells repeated for each entry. The table's style shades every second row through nthChild, so the shading follows however many rows the data holds. The variants table uses the same style over $data.variants.

"styles": {
"specs": { "border": "none", "marginBottom": 4, "nthChild": { "2n": { "backgroundColor": "#FAF8F4" } } }
},
"content": [
{
"table": {
"style": "specs",
"source": "$data.specs",
"widths": [5, 5, 3],
"rows": [
[{ "th": "PARAMETER", "style": "th" }, { "th": "VALUE", "style": "th" }, { "th": "UNIT", "style": "th" }],
[{ "td": "$item.parameter", "style": "tdKey" }, { "td": "$item.value", "style": "tdStrong" }, { "td": "$item.unit", "style": "td" }]
]
}
}
]

The feature cards are lists bound the same way: { "ul": { "source": "$data.features.performance", "map": "$item.feature", "li": [] } }, one per card. The certification seals are svg circles whose centred text reads $data.certifications.0.mark, with .1, .2 and so on for the others.

Barcodes and fields, written inline​

The ordering codes and the approval fields are shortcodes inside paragraphs. The EAN-13 and the QR code take their values from data, and the text fields start from the document number and the revision:

{ "p": "[barcode, ean13, $data.product.ean, 84.6|58.8, hrt=true]" },
{ "p": "[barcode, qrcode, $data.product.productUrl, 54|54]" },
{ "p": "Document no.[br][textfield, docNumber, '$data.product.docNumber', 116|18]", "style": "fl" },
{ "p": "Signature[br][signature, approvalSignature, 200|34]", "style": "fl" },
{ "p": "[checkbox, qaApproved, false, 14|14] QA sign-off complete", "style": "check" }

The [signature] field is left empty, for the approver to sign in a reader.