Add page-level text extraction for PDF/PPTX/DOCX documents#1263
Add page-level text extraction for PDF/PPTX/DOCX documents#1263jeonsworld wants to merge 4 commits intomicrosoft:mainfrom
Conversation
|
@microsoft-github-policy-service agree |
|
I like this idea. It meshes well with the pptx slide output as well. I need to do a little testing before merging -- I'll try to do that this weekend. |
|
Hi team - any ETA on the release of this PR? This would greatly help our project. |
|
@jeonsworld It seems that some statuses are on standby, and we need them for our project, so please move forward. |
|
@afourney Hi, the workflows for this PR are currently pending approval. Could you please review and approve them so the checks can run? Thank you. |
|
Hello everyone and @afourney, Apologies for the tagging but I was wondering if there is an ETA on this? It's something that would be very useful overall and also for a particular project my team is working on. |
|
This feature will be very useful so I am also wondering when this can be approved. Thank you. |
|
Has this been implemented yet? |
|
Would be helpful to me aswell! |
|
Hi! First of all, thank you so much for developing this feature. Could you please let me know when this version will be released? It would be incredibly helpful for my project! |
|
Such an important feature can we get new build here 0.7.2 with extract_pages feature added to it |
|
Hi, want to ask if this will be merged into the main branch? This is a really important feature |
|
Hello, could you please move it to the main branch? This feature is so important!! Thank you for this wonderful project. |
|
Please merge this pull request and release it. It is very important for our project. |
|
What is the status of this task??? When is this going to be added? |
- Add PageInfo class to store page number and content - Enhance DocumentConverterResult with optional pages attribute - Extend PdfConverter with extract_pages parameter for page-by-page processing - Add CLI support with --extract-pages and --pages-json flags - Implement robust error handling with fallback to full document extraction - Maintain 100% backward compatibility with existing API - Add comprehensive test suite with 8 test cases covering all scenarios
- Add slide-level extraction for PPTX files with extract_pages parameter - Each slide is treated as a PageInfo object with sequential numbering - Add extract_pages parameter to DOCX for API consistency (returns None due to dynamic pagination) - Import PageInfo class in both converters to support the new functionality - Add comprehensive test suites for both formats ensuring backward compatibility - Maintain 100% backward compatibility with existing API
- Format all Python files with Black (v23.7.0) - Fix line length and formatting issues in page extraction feature files - Ensure consistent code style across the codebase
Summary
Adds optional page extraction to PDF, PPTX, and DOCX converters with extract_pages parameter, returning structured page data while maintaining full backward compatibility.
Motivation
Users need to process PDF/PPTX/DOCX pages separately and know which content comes from which page for page-aware applications. Additionally, local development settings should not be tracked in version control.
Changes
Usage
Python API
CLI
Resolved #210 #122