Skip to content

Fix CDSL CAS header parsing (statement period beyond first 1000 chars)#119

Open
ritesd wants to merge 1 commit intocodereverser:mainfrom
ritesd:fix/cdsl-header
Open

Fix CDSL CAS header parsing (statement period beyond first 1000 chars)#119
ritesd wants to merge 1 commit intocodereverser:mainfrom
ritesd:fix/cdsl-header

Conversation

@ritesd
Copy link

@ritesd ritesd commented Mar 13, 2026

  • Widen header search window from 1000 to 5000 chars in nsdl_statement.parse_header
  • Add DEMAT_STATEMENT_PERIOD_ALT_RE for "Statement for the period from ... to ..."
  • Route FileType.CDSL to process_nsdl_text so CDSL statements use demat parser

Fixes HeaderParseError for CDSL inbound-style PDFs where the period line appears after the first 1000 characters in the mupdf-extracted text.

- Widen header search window from 1000 to 5000 chars in nsdl_statement.parse_header
- Add DEMAT_STATEMENT_PERIOD_ALT_RE for 'Statement for the period from ... to ...'
- Route FileType.CDSL to process_nsdl_text so CDSL statements use demat parser

Fixes HeaderParseError for CDSL inbound-style PDFs where the period line
appears after the first 1000 characters in the mupdf-extracted text.

Made-with: Cursor
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.

1 participant