The old getPdfPageCount used a fragile regex on raw PDF binary that could undercount pages, causing survey sides to be skipped entirely. Replaced with pdf-lib's PDFDocument.load() for reliable counting, with the old regex as a fallback. Added logging for page counts and pairing to diagnose missing backs. Made-with: Cursor |
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| lib | ||
| instrumentation.ts | ||