File size: 1,023 Bytes
622387b
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
# Issue

**Title:** PDF documents not closed, and CDSL MF folio numbers incorrectly parsed

## Description
When processing PDF documents using `read_cas_pdf`, `pypdfium` reports "objects still open" warnings during application teardown, indicating that PDF documents are not being properly closed after use. PDF documents should be closed to prevent resource leaks and avoid these warnings.

Additionally, when parsing CDSL Mutual Fund holdings, folio numbers that span across columns (e.g., "910121125" in one column and "82/0" in an adjacent column) are incorrectly parsed. The "82/0" portion is currently misinterpreted as a separate "mode" column, leading to the truncation of the actual folio number. The full folio number, such as "91012112582/0", should be correctly assembled and parsed as a single entity.

## Task

Modify the repository so that the issue described above is resolved. The task's test suite verifies your patch by applying it on top of the base commit `789865de12b2` and running the modified tests.