Skip to content

fix(paperwork-pdf): prevent Q/A text overlap for long answers#8175

Open
saewitz wants to merge 2 commits into
developfrom
jsaewitz/otr-1884-ehr-paperwork-pdf-little-ui-tweak-improve-attorney-for-motor
Open

fix(paperwork-pdf): prevent Q/A text overlap for long answers#8175
saewitz wants to merge 2 commits into
developfrom
jsaewitz/otr-1884-ehr-paperwork-pdf-little-ui-tweak-improve-attorney-for-motor

Conversation

@saewitz

@saewitz saewitz commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Long answers like "I do not have an attorney" (~152pt) and the question "Do you have an attorney?" (~162pt) both rendered side-by-side in a ~260pt column, causing visible text overlap in the paperwork PDF
  • Reduces ITEM_MAX_CHARS_PER_LINE in paperwork-to-pdf/draw.ts from 25 to 13 — at worst-case 12pt Helvetica char width (~10pt), 13 chars ≈ 130pt, which keeps each side within its half of the column

Closes OTR-1884

Test plan

  • Create a visit with reason "Auto accident"
  • In intake paperwork, select "I do not have an attorney" → generate paperwork PDF → confirm "Do you have an attorney?" and "I do not have an attorney" no longer overlap
  • Select "I have an attorney" and fill in details → confirm all attorney fields render cleanly without overlap
  • Spot-check other paperwork sections with long question/answer text to confirm wrapping looks correct

🤖 Generated with Claude Code

Long answers like "I do not have an attorney" (~152pt) rendered side-by-side
with an equally long question in a ~260pt column caused visible text overlap.
Reducing ITEM_MAX_CHARS_PER_LINE from 25 to 13 ensures each side stays within
its half of the column (~130pt at worst-case Helvetica char width).

Closes OTR-1884.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@saewitz saewitz force-pushed the jsaewitz/otr-1884-ehr-paperwork-pdf-little-ui-tweak-improve-attorney-for-motor branch from cec8a23 to 42072f8 Compare June 15, 2026 18:12
@saewitz saewitz changed the title fix(pdf): render 'Do you have an attorney?' row in Attorney section fix(paperwork-pdf): prevent Q/A text overlap for long answers Jun 15, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@saewitz saewitz requested a review from AykhanAhmadli June 29, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants