
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
A package to help manage pdf pages, images and their conversions during different NLP, CV or other tasks to avoid repetitive code blocks and give a simple function call to make it happen
A package to help manage PDF pages, images, and their conversions during different NLP, CV, or other tasks to avoid repetitive code blocks and provide a simple function call for operations.
To install PdfSnipper, use:
pip install -i https://test.pypi.org/simple/ pdf-snip
poppler-utils
For Google Colab:
!apt-get install -y poppler-utils
For Ubuntu/Debian:
sudo apt install poppler-utils
For Windows:
Download the latest release from here.
After installation in /ProgramFiles
, set the PATH environment variable:
import os
os.environ['PATH'] += os.pathsep + r'C:\path\to\poppler\bin'
Removes the first N
pages from all PDFs in a folder.
remove_first_pages(input_folder: str, output_folder: str, pages_to_remove: int)
input_folder
: Path to the folder containing PDFs.output_folder
: Path to save modified PDFs.pages_to_remove
: Number of pages to remove from the start.from PDFSNIPPER import remove_first_pages
remove_first_pages('/content/input', '/content/output', 2)
Removes the last N
pages from all PDFs in a folder.
remove_last_pages(input_folder: str, output_folder: str, pages_to_remove: int)
input_folder
: Path to the folder containing PDFs.output_folder
: Path to save modified PDFs.pages_to_remove
: Number of pages to remove from the end.from PDFSNIPPER import remove_last_pages
remove_last_pages('/content/input', '/content/output', 3)
Keeps only the pages within a specified range [start_page, end_page]
inclusive, removing all others.
remove_pages_outside_range(input_folder: str, output_folder: str, start_page: int, end_page: int)
input_folder
: Path to the folder containing PDFs.output_folder
: Path to save modified PDFs.start_page
: First page to keep (0-indexed).end_page
: Last page to keep (0-indexed).from PDFSNIPPER import remove_pages_outside_range
remove_pages_outside_range('/content/input', '/content/output', 2, 5)
Saves only specific pages from PDFs into a new folder.
save_specific_pages(input_folder: str, output_folder: str, pages_to_save: list)
input_folder
: Path to the folder containing PDFs.output_folder
: Path to save modified PDFs.pages_to_save
: List of page numbers (0-indexed) to keep.from PDFSNIPPER import save_specific_pages
save_specific_pages('/content/input', '/content/output', [0, 2, 3])
Saves specific pages as PNG images in a new folder.
save_pages_as_images(input_folder: str, output_folder: str, pages_to_save: list)
input_folder
: Path to the folder containing PDFs.output_folder
: Path to save PNG images.pages_to_save
: List of page numbers (0-indexed) to save as images.from PDFSNIPPER import save_pages_as_images
save_pages_as_images('/content/input', '/content/output', [0, 2, 4])
Splits each page of a PDF into individual PDF files.
split_pdf(input_folder: str, output_folder: str)
input_folder
: Path to the folder containing PDFs.output_folder
: Path to save split PDFs.from PDFSNIPPER import split_pdf
split_pdf('/content/input', '/content/output')
FAQs
A package to help manage pdf pages, images and their conversions during different NLP, CV or other tasks to avoid repetitive code blocks and give a simple function call to make it happen
We found that pdf-snip demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.