Splitting PDF Files with Python
HTML-код
- Опубликовано: 5 фев 2025
- In this video, we learn how to split one PDF file up into multiple.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine...
💻 The Algorithm Bible Book: www.neuralnine...
👕 Programming Merch: www.neuralnine...
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine...
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/Neu...
🎙 Discord: / discord
🎵 Outro Music From: www.bensound.com/
Exactly what I was looking for! Thanks!
Banger vids! keep up the good work and I have a question; I'm struggling learning python and kind of stuck. I know the basics I can build beginner projects, but I don't know what to do next.
I am getting back into production after so ti and tNice tutorials makes it so easy to understand. Thank you so much for making these videos.
Thanks for all your videos. It’s great!!! Can you kindly make few videos on OpenXML handling as well.
Changing fonts, colour, table handling etc.
thank you, I see this beeing really useful!
thank you for the good video! i need to extract from a bunch of pdfs the first page only. how would I need to change the script to make it work?
hi. great video. I have a question: is it possible to merge a pdf with many pages (or even multiple pdf files) into just one file and one page? even if the words/images will be on top of the other
Looo at his previous vid
@@insert9124 Actually I watched it already but what I'm asking is quite different it's if has some way to combine 2 (or more) pdf into just one page instead of adding it to the end of previous pdf. ps.: 1 pdf with an image on top left and another pdf with image on top right, then combining these two I got 1 pdf with those 2 images on top left and right. I hope it makes sense :)
Thanks bro....for this video
Hello. I want to OCR PDF, but for a language that is not supported by standard libraries you used in your past video. How can I make possible OCR in a different language?
what is he using to code? i need help please
I want to convert 1 gb file into small chunks and then want to convert them into a single excel file
Nice video, I share you the updated script after some functions on PyPDF2 were depreciated..... Here Is how I splitted my pdf into 50 pages chunks
import PyPDF2
pdf = PyPDF2.PdfReader('your_pdf_file.pdf')
num_pages = len(pdf.pages)
for i in range(0, num_pages, 50):
writer = PyPDF2.PdfWriter()
for j in range(i, i+50):
if j < num_pages:
page = pdf.pages[j]
writer.addPage(page)
output_file_name = f"chunk_{i//50+1}.pdf"
with open(output_file_name, 'wb') as output:
writer.write(output)
addPage shoud be changed to add_page() is depreciated as well
👍
Second comment