How To Read A PDF File With Tkinter - Python Tkinter GUI Tutorial

Поділитися
Вставка
  • Опубліковано 8 лют 2025
  • In this video I'll show you how to read a simple PDF file with TKinter.
    We'll open the PDF file using PyPDF2, and read it into a Tkinter Text() widget. Reading simple pdf files with Python is pretty easy, it only gets more complicated when the pdf files start using images and input fields and things like that ;-)

КОМЕНТАРІ • 59

  • @Codemycom
    @Codemycom  4 роки тому +2

    ▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My UA-cam Channel:
    bit.ly/2UFLKgj bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
    ▶️ Get The Code
    bit.ly/3fLFQ8p

  • @halalmeatshophk
    @halalmeatshophk 3 роки тому +5

    instead of reading the PDF content, is there a simple way of just displaying the first page of the PDF? for example displaying it on a Frame or Label?

  • @idk____idk6530
    @idk____idk6530 4 роки тому +9

    I don't have PC but I still do in phone.using pydroid 3.. I want to master python ... ....😁

  • @m_abhijit_
    @m_abhijit_ 3 роки тому +1

    This is actually what i'm searching for 👍🏻 UA-cam is so cool 😀 and you also 😎👍🏻

  • @hamidhafiz4069
    @hamidhafiz4069 3 роки тому

    I am a beginner of python.you are awesome man.

    • @Codemycom
      @Codemycom  3 роки тому

      Thanks! And welcome to the wonderful world of Python!

  • @PANDURANG99
    @PANDURANG99 2 роки тому

    PDF viewer and editor , zoom in, out ,select like adobe.is there pdf viewer in python.

  • @py_tok5589
    @py_tok5589 4 роки тому +1

    Hi Jhon, I cnt read off teh pdf tex,t, I can get to the folder directory but when I call the pdf, the screen is b;ankc, you method may be faulty, by the way I double checked the code many times

  • @suleman6432
    @suleman6432 3 роки тому

    Thanks Sir.I was looking for this kind of video for my project

  • @sanyamrawal7773
    @sanyamrawal7773 3 роки тому +1

    Hey please tell me how to open multiple pages in this GUI.

  • @KristiaansPaaps
    @KristiaansPaaps 3 роки тому

    These videos are super helpful for beginner programmers, thank you!
    I have a problem with texts in Tkinter , maybe you have a quick answer..
    In this case app does not extract (or visualize in text box) words that include letters with some diacritic marks (like ā, ž, ņ). Diacritic marks are also displayed as weird symbols if a text from text box is saved to .txt file. I guess it has to do something with encoding?

  • @vio-noob_6737
    @vio-noob_6737 4 роки тому

    Your channel is great!

    • @Codemycom
      @Codemycom  4 роки тому

      Thanks! Tell your friends ;-)

  • @rensgalesloot3628
    @rensgalesloot3628 4 роки тому +3

    Is there a way to make it then when an entry box appears, the user can already type without having to click on it?

  • @digitalmachine0101
    @digitalmachine0101 11 місяців тому

    Good information

  • @varyirving6491
    @varyirving6491 4 роки тому

    A big fan of all ur playlists....
    Is it possible to add scrollbars to dropdown menus and other widgets.... If it is possible please make a video on that....

    • @Codemycom
      @Codemycom  4 роки тому

      Hm, I'm not really sure

  • @suyoggoel5718
    @suyoggoel5718 2 роки тому

    please solve this issue: many of the imports are not being recognised by "pylance", in vs code for me. it cant even recognise the PYPDF2 module. How do i solve this annoying issue>

    • @Codemycom
      @Codemycom  2 роки тому

      Stop using vscode for python things.

  • @ramehharmouch6245
    @ramehharmouch6245 4 роки тому

    when click the menu how to put the choice from the beginning of line not from center?

  • @vulnoryx
    @vulnoryx 4 роки тому +2

    Very interresting... What about pdf files with text AND Photos (*.png)

    • @idk____idk6530
      @idk____idk6530 4 роки тому

      That's the problem .. I can't import May thing in my phone ....it has limit

    • @idk____idk6530
      @idk____idk6530 4 роки тому

      But still I just wrote down in book 📚
      All the code ....

    • @Codemycom
      @Codemycom  4 роки тому +1

      that's a more advanced topic that I may dive into later. But as I said in the video, we won't be discussing that in this video.

    • @vulnoryx
      @vulnoryx 4 роки тому

      @@Codemycom i understand i cant wait for mode

  • @johngiangrande2996
    @johngiangrande2996 3 роки тому +1

    Hey John, thanks for the cool vid! I kept getting this error on the final run: "PdfReadWarning: PdfFileReader stream/file object is not in binary mode. It may not be read correctly. [pdf.py:1079] Exception in Tkinter callback." If anybody else gets it...The fix is: add the parameter mode='rb' to filedialog.askopenfile(), It opens it in binary mode and then PdfFileReader works on the welcome.py file. Go fig' . Thanks again.

    • @jigzltd
      @jigzltd 3 роки тому

      Most appreciated, thanks John!

  • @aadityasahoo6244
    @aadityasahoo6244 4 роки тому +1

    Hey Mr elder,
    Can u tell us how we can add spaces in the output
    Because whenever there is a line change its eds up like :
    HelloWelcome to codemy.comI am John elder

  • @folody9959
    @folody9959 4 роки тому

    how to make line number for text editor in Tkinter

  • @micomc
    @micomc 4 роки тому

    Can u do, How to read barcode with python in tkinter?

  • @techgander6281.official
    @techgander6281.official 3 роки тому

    Import "PyPDF2" could not be resolvedPylance

  • @idk____idk6530
    @idk____idk6530 4 роки тому +2

    I'm first ❤️❤️❤️

  • @rezantuzak4106
    @rezantuzak4106 4 роки тому

    Please make some videos about protecting our application please 💛💙🧡

    • @Codemycom
      @Codemycom  4 роки тому

      Protecting them from what?

    • @rezantuzak4106
      @rezantuzak4106 4 роки тому

      @@Codemycom making an exe file and making a product key for yearly on monthly, sir.

  • @mithilsingh2906
    @mithilsingh2906 4 роки тому

    You could have used lambda instead of making the 'clear text ' function

    • @Codemycom
      @Codemycom  4 роки тому +1

      There's always a million ways to do a thing...

  • @LourdHarshanR
    @LourdHarshanR 3 роки тому

    Teach us to extract images tables

  • @silentwavy
    @silentwavy 4 роки тому

    is there a way to make a counter within a timer for every time the timer hits zero the counter adds 1

  • @silentwavy
    @silentwavy 4 роки тому

    is there a way in tkinter to make a timer that keeps on going and every time it hits zero a counter counts the number of times the timer hits zero

    • @Codemycom
      @Codemycom  4 роки тому

      Sure

    • @silentwavy
      @silentwavy 4 роки тому

      @@Codemycom can u please make a video explaining how

  • @someone-od2qi
    @someone-od2qi 4 роки тому

    ;-)