(data)
| 539 | |
| 540 | |
| 541 | def convert_page_to_int(data): |
| 542 | for item in data: |
| 543 | if 'page' in item and isinstance(item['page'], str): |
| 544 | try: |
| 545 | item['page'] = int(item['page']) |
| 546 | except ValueError: |
| 547 | # Keep original value if conversion fails |
| 548 | pass |
| 549 | return data |
| 550 | |
| 551 | |
| 552 | def add_node_text(node, pdf_pages): |