 Okay, today I'm just gonna give you some tips on displaying the text from PDFs in your shell. So let's look here real quick. I have a PDF that I actually printed and scanned for another project, but I ran OCR on it, Optical Character Recognition. And so now you can highlight the text because it's added a layer of text over it so I can highlight the text and copy it. But I wanna view that in my shell. Let's go ahead and move that out of the way. I'm in the directory here with that document. It's called document.pdf. Now, there are two tools that are similar, but a little different, and that's what I'm gonna show you today. One is called PDF2.txt, and the other one's called PDF.to.txt, okay? And now if you search your repositories on Debian, you're not gonna find them under those names. There is one, if I run aptitude here, as my package manager, one's called popular utilities, which it has more than one utility in it, whether it's utilities for PDF. And that would be the one that is PDF.to.txt. And then the other one is currently called Apache, I'm sorry, Apache, why did I say Apache? Python 3 PDFminer. So let's see how both of those look. So again, I have that document here. Let's go ahead and use PDF2.txt and give it that document name. There you go, it displayed the text and we can scroll up here and you can see that it has translated, or not translated, but just outputted the text. And again, this is from a PDF that Ori has a text layer in it, not just an image. You need optical character recognition for that and that's another video. Let me go ahead and run this now. The same thing with PDF2.txt, see that's T-O-E-X-T, let me get a little bigger there. Now if you just run it like this, nothing seems to happen, because it created a text file for you, usually with the same name as the PDF, but with .txt at the end. Let me go ahead and cat that out, you can see how that looks. It puts it in a file by default. If you want to just directly output it to the screen, all you have to do is run the same command but give it a dash and that's saying to put it to standard output. So there you go, so you don't create a file that way. But you'll notice that both options don't format it quite right. So let's look at the original PDF. We have, at the first line here, we have the date and then we have a document number over here. If we look at this, it has the date here and the document number is lower. So they're not on the same line like they should be. And if we go back to the other PDF2 text, so PDF2, the number two, T-X-T and the file number and then we scroll up a little bit here, it does the same thing. They both actually format a little bit different. They have different spacing. What if you wanted to display like it does in the file? Now, as far as the PDF number two, T-X-T, I don't know if it can do it. But the other option, the PDF-T-O-T-E-X-T, so PDF2 text, has an option that you can add in and if you just do dash layout, it should preserve the formatting of the text. So there you go. Now that actually looks like the original text. Well, until I do that. But you can see that we have the date and the document number on one line, one on the left side and one on the right justified. And then everything else in this particular file is actually centered. So if we go back here, you can see that it did it. It's not perfect, because the text here is a larger font. So when you do it in the shell, it actually got moved over a little bit because it's a smaller font because everything's the same font in the shell. But that's pretty much as close as you're gonna get in the shell since you don't have different size fonts in the shell. So I hope you found that useful. Depending on what you're doing, it may or may not make a difference, but it definitely has come in handy for me if I'm trying to search through something in a file and I'm looking for certain patterns in the file. Sometimes I want them, every section lined out in an individual line or I want it formatted as the original document so I can look for patterns in the document. I hope you found this useful. Films by chris.com. That's Chris of the K. There's a link in the description. Check it out. I also have a Patreon, patreon.com forward slash metalx1000. I'll link in the description to that. You can also support me on site. There's a support section with Libre, Pay and Paypal and of course links to my Patreon. But thanks for the likes, share, subscribe and thank you for watching and I hope that you have a great day.