Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

42 - PDF Manipulation Tools

Python Difficulty: Intermediate Phase

What It Does

PDF utilities using PyPDF2 for extracting text, merging PDFs, splitting by page range, and reading metadata.

Run It

pip install -r requirements.txt
python pdf_tools.py

Core Concepts

  • PyPDF2.PdfReader for reading PDFs
  • PyPDF2.PdfWriter for creating PDFs
  • Text extraction from pages
  • PDF merging and splitting
  • Metadata extraction

What You Will Learn

You will learn how to programmatically manipulate PDF documents and build document processing automation.

Project Structure

42-pdf-tools/
  README.md
  pdf_tools.py
  requirements.txt

Prerequisites

Install the required packages before running:

pip install PyPDF2

Example Output

PDF Tools
---------
1. Extract Text
2. Merge PDFs
3. Split PDF
4. Get Metadata

Choice: 4
File: document.pdf
  Title: Annual Report 2024
  Author: John Smith
  Pages: 42
  Creator: Microsoft Word