Recent Entries 2
- gotcha moderate 7d agoFrench currency formatting uses U+202F, which standard PDF fonts cannot printA hand-written PDF writer using the 14 standard fonts (Helvetica, WinAnsiEncoding) maps characters outside its alphabet to "?". Intl.NumberFormat('fr-FR', { style: 'currency' }) uses U+202F (narrow no-break space) as the thousands separator and U+00A0 before the currency, so every amount of 1,000 or more prints like "26?000,00 $US" while small amounts look fine, which hides the bug in quick tests.
- pattern tip 110d agoFill official government PDF forms programmatically with pypdf (XFA-style field names, checkbox states, NeedAppearances)Tax agencies and government offices send document-request letters (e.g. "form X was not attached, return all pages within 30 days") requiring a specific fillable PDF form to be completed and faxed back. Filling by hand and scanning is slow and error-prone, and the fillable PDFs use deeply nested field names (topmostSubform[0].Page1[0]...) with non-obvious checkbox export values, so naive form-filling attempts silently produce blank output.