py-pdf/pypdf ? reverse-engineered prompt

Reverse engineered prompt

Build me a pure Python PDF library that can open PDF files, read pages, extract text and metadata, and let me split, merge, crop, and transform pages.

I also want it to support basic PDF editing features like adding custom data, viewing options, passwords, encryption and decryption, and reading or creating annotations. Please make it easy to use from Python with a clean reader and writer style API, and include a small set of examples in the README so I can see how to load a file, count pages, extract text, and save changes.

Keep it reliable and well tested, since this kind of library has to handle lots of real world PDFs. If you need to check current best practices or details from the official docs, look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab