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/

Комментарии • 17

  • @avinash_shrivastava
    @avinash_shrivastava 2 года назад

    Exactly what I was looking for! Thanks!

  • @jeevanbastolaofficial
    @jeevanbastolaofficial 2 года назад

    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.

  • @félixcontrelebotcoin
    @félixcontrelebotcoin 2 года назад

    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.

  • @HarisutarsanNR
    @HarisutarsanNR 2 года назад

    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.

  • @laracombina
    @laracombina 2 года назад

    thank you, I see this beeing really useful!

  • @ultramango2469
    @ultramango2469 2 года назад

    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?

  • @fmassaretto
    @fmassaretto 2 года назад +1

    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

    • @insert9124
      @insert9124 2 года назад

      Looo at his previous vid

    • @fmassaretto
      @fmassaretto 2 года назад +1

      @@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 :)

  • @sathiyapoobalan2073
    @sathiyapoobalan2073 2 года назад

    Thanks bro....for this video

  • @AzimAzizov
    @AzimAzizov 2 года назад

    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?

  • @IsaacSuraj
    @IsaacSuraj 10 месяцев назад

    what is he using to code? i need help please

  • @gurikashyap5921
    @gurikashyap5921 21 день назад

    I want to convert 1 gb file into small chunks and then want to convert them into a single excel file

  • @nicolaslpf
    @nicolaslpf Год назад

    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)

    • @nicolaslpf
      @nicolaslpf Год назад

      addPage shoud be changed to add_page() is depreciated as well

  • @guilherme5094
    @guilherme5094 2 года назад

    👍

  • @ahmedgamberli2250
    @ahmedgamberli2250 2 года назад +1

    Second comment