2.5 KiB
2.5 KiB
ShopProQuote PDF Styling Guidelines
PDFs are generated client-side by quote-tab-manager.js → generateQuotePDF() using jsPDF (dynamically imported from CDN).
User's aesthetic preferences
- Compact and tight — no wasted whitespace, no large gaps between labels and values
- Professional — clean invoice-style with subtle gray background panels, thin separators, no colons on labels
- Font sizes: 8-10px range. 8px for labels/section headers, 9px for body text, 10px for bold totals
- Spacing: 6-8px between lines, tight but readable
- Boxes: subtle
#f8f8f8fill with#dcdcdcborder at 0.5px, 2-3px corner radius - Separators: 0.5px
#c8c8c8(not thick black lines) - Labels: no colons, gray (#646464) for field labels, black for values
Key rendering sections in generateQuotePDF()
Header box (~line 3765)
- Two-column: SERVICE PROVIDER (left) + CUSTOMER INFORMATION (right)
- Fill is drawn FIRST (
roundedRectwith'F'only) before text, so text renders on top - Border drawn AFTER content (
roundedRectwith'D'only) at computed height headerBoxPaddingcontrols top+bottom padding consistently
Customer info lines (~line 3841)
addInfoLine()helper — label atrightColX, value atrightColX + 55(compact, not full-width)- Labels: Customer, Vehicle, RO #, Mileage, VIN, Date
Service items (~line 3917)
- Service name: 10px bold at line 3994
- Price: right-aligned, same line
- Customer decision badges (approved/declined) above service name
- Priority, recommendation, explanation, parts notes follow
Totals box (~line 4172)
- Summary box at 45% width from right margin
- Fill
#f8f8f8, border#dcdcdcat 0.5px - Line items: 9px, gray labels, black values, 8px row spacing
- TOTAL: 10px bold
- Shop charge note positioned at
boxBottomY + 10(below box boundary, never overlapping)
Pitfalls
- Box covering text: draw fill-only (
'F') BEFORE text; draw border-only ('D') after content height is known - Overlapping sections: use
boxBottomYfrom the box calculation, notyPos + Nmagic numbers - Invisible borders:
#fafafafill with#e6e6e6border at 0.5px is imperceptible — use#f8f8f8fill with#dcdcdcborder for visible contrast - Excessive whitespace between label/value: don't right-align values to
pageWidth - margin— use a fixed offset from the label instead (rightColX + 55) - Font size consistency: keep body text at 9px, labels at 8px, totals at 10px throughout