Repository navigation
v1.3.9.2 - Server-Side Headless Chromium PDF Generation & TrueType CMap Compliance
Changes in v1.3.9.2
-
Server-Side Headless Chromium PDF Generation (1-Click Download):
- Added authenticated endpoint
GET /api/projects/[id]/pdfgenerating executive submittal packages in memory using Puppeteer and headless Chromium (@sparticuz/chromiumon serverless Linux, local Chrome/Edge auto-detection on Windows/macOS). - Configured with landscape A4 dimensions, high-DPI scaling, and
maxDuration = 60. - Stitches all 8 schedules (
CoverPage,LoadSchedule,MDBSchedule,CableSchedule,BreakerSchedule,VDSchedule,ShortCircuitSchedule,BOMSchedule) withReportHeaderand standalone Base64-compiled CSS.
- Added authenticated endpoint
-
100% Compliant TrueType /ToUnicode CMaps & Clean Text Extraction:
- Embedded installable TrueType fonts (
Arial,Consolas) with complete/ToUnicodeCMaps, eliminating previous PDF parser extraction failures and(cid:XX)glyph errors in PyPDF2, pdfminer, and Adobe Acrobat. - Successfully verified on a 12-page submittal package with 11,393 extracted characters, 0 empty pages, and 0
(cid:XX)errors, with 100% fidelity for engineering symbols (3Φ,mm²,kA).
- Embedded installable TrueType fonts (
-
PDF Print Buffer Overflow & Hidden Calculation Cell Fixes:
- Eliminated font-outlining bezier explosion that caused printer spooler memory exhaustion on multi-page browser prints.
- Exempted interactive calculation elements inside table cells (
<TraceableCell>) from@media print { [role="button"] { display: none } }, ensuring full visibility across all printed tables.
-
Standardized Apparent Power (kVA) as Primary Engineering Metric:
- Updated Load Calculator summary cards, Executive Cover Page, SLD diagram headers, and Excel exports to prominently feature apparent power (kVA) for transformer and generator sizing, with active power (kW) and power factor clearly displayed in subtext.
-
Quality Assurance & Verification:
- Added unit and integration tests covering
renderReportHtmlandGET /api/projects/[id]/pdf. - Verified 100% passing test suite across all 60 test files (709 tests).
- Verified Next.js 16 production build (
next build) with 0 errors.
- Added unit and integration tests covering