Enhancement: Add Support for Specifying and Converting Specific Pages from PDF (Issue #285 Resolved) #292
+148
−135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear Reviewer,
Your project is absolutely fantastic! My submission adds a new feature to the PDF conversion module, addressing the issue raised in #285, which allows users to specify and convert only certain pages from a PDF. This enhancement gives users more flexibility to extract the needed pages from a PDF and convert them to images, without having to convert the entire PDF document.
During the implementation, I added the page_indexes parameter to receive user-specified page indexes. The program first converts all pages into images in memory, then filters and saves only the pages matching the page_indexes. This approach not only avoids unnecessary page conversions but also ensures that users process only the pages they need. If there are any mistakes, please kindly point them out as I’m new to the GitHub community. Thank you so much for your time and support!