34
submitted 1 day ago* (last edited 1 day ago) by over_clox@lemmy.world to c/linux@lemmy.world

I'm running Termux with XFCE desktop on Android. I only just realized that the only program I currently have installed that can properly open PDFs is GIMP, and that's extreme overkill as I just want a lightweight reader, no need to manipulate them as images ya know.

Also, related side question, are there any lightweight Linux terminal programs that can export PDF as plain text? I'm kinda hoping to pipe the text output of George Orwell 1984 through espeak reader and have Linux read it out to me...

Edit: Plain text and speech engine questions solved, and rather simple no less. This is the refined version BTW, --stdin is necessary to make espeak read the entire document.

pdftotext go-1984.pdf -|espeak --stdin

all 37 comments
sorted by: hot top new old
[-] rImITywR@lemmy.world 34 points 1 day ago
[-] 2ndDegreeOWO@lemmy.world 17 points 1 day ago

Another vote for Okular.

KDE default, and it's always worked fantastic for me in the past. Actually, lol, I was just giving a presentation a couple weeks ago using it, and -- I am not making this up -- one of the people in the audience was so impressed he came up to ask me what program I was using.

[-] book@lemmy.zip 17 points 1 day ago

I like Okular, i'd say its medium resource usage though and it might require kde packages you dont already have. Still, might be woth checking out, its the default in Plasma and does everything i need.

https://en.wikipedia.org/wiki/Okular

[-] yakko@feddit.uk 4 points 1 day ago

I'm doing alright with okular. Trying to figure out how to change the settings so that ctrl+w closes the window entirely instead of just the document inside it...

[-] over_clox@lemmy.world 2 points 1 day ago* (last edited 1 day ago)

I love all you awesome penguins, have a can of cool beans!

Yeah, actually I do already have the KDE packages installed for a couple other apps, so Okular was a nothing burger to get installed, and works perfectly πŸ‘

Also, as far as speech, yeah that turned out pretty easy too...

pdftotext go-1984.pdf -|espeak

[-] lightrain@forum.storstad.net 10 points 1 day ago* (last edited 1 day ago)

PDF Viewer/Reader: ever tried okular? (part of the KDE Project) Extract text from PDF via CLI: Use pdftotext (part of the poppler-utils package)

[-] tal@lemmy.today 8 points 1 day ago* (last edited 1 day ago)

I view PDFs on Linux with evince or xpdf. Xpdf is lighter but has fewer features.

are there any lightweight Linux terminal programs that can export PDF as plain text

pdftotext

EDIT: Xpdf probably also isn't Wayland-native, if that matters for you.

EDIT2:

https://en.wikipedia.org/wiki/Evince

https://en.wikipedia.org/wiki/Xpdf

https://en.wikipedia.org/wiki/Poppler_(software)

(pdftotext is in the poppler-utils package in Debian)

EDIT3: Oh, looks like Xpdf got ported to Qt, so it probably can do Wayland these days.

[-] over_clox@lemmy.world 2 points 1 day ago* (last edited 1 day ago)

Fuck...

E: Failed to fetch https://mirrors.hust.edu.cn/termux/apt/termux-x11/pool/main/x/xpdf/xpdf_4.06_aarch64.deb Could not connect to mirrors.hust.edu.cn:443 (222.20.97.213), connection timed out

~~Also, apparently pdftotext must not have been recompiled for Termux.~~ Apparently I was mistaken, part of the poppler tools, pdftotext already installed.

Termux is kinda special like that, as its entire filesystem doesn't reside in / like normal Linux, it resides in /data/data/com.termux/files/, so every single program that even exists for it had to be specially recompiled just for it.

Anyways, guess I'm about to try to install evince...

Sucks though that xpdf exists for Termux but the server isn't responding right now :(

Edit: FuckΒ²...

E: Failed to fetch https://mirrors.sdu.edu.cn/termux/apt/termux-main/pool/main/libs/libsynctex/libsynctex_1:2026.0-2_aarch64.deb 404 Not Found [IP: 101.76.224.129 443]

Edit 2: I'm a fucking idiot, the poppler tools are already installed, and I already have pdftotext installed. Stupid sexy apt install pdftotext didn't tell me that LMFAO!

[-] tal@lemmy.today 3 points 1 day ago* (last edited 1 day ago)

Honestly, I didn't even know that one could do a graphical environment on Termux (as XFCE and GIMP would entail) with it. The Termux I know on Android is an app in F-Droid that provides a terminal-only environment. So I don't really know what-all is packaged for the environment you're using. Just saying that traditional Linux distros will have those.

EDIT: You might run a pkg update in Termux to update the index of currently-available packages, then try installing it.

[-] over_clox@lemmy.world 2 points 1 day ago

Yeah, same Termux app from F-Droid running the show, via VNC...

Termux + vncserver + XFCE displayed through MultiVNC here, it was a fun journey getting it all set up, but yeah I've been running this as my main daily runner since July, and rather almost like it LOL!

Not sure if you caught my edits, but aapparently the poppler tools were already installed, so I already have pdftotext πŸ‘

[-] tal@lemmy.today 2 points 1 day ago

Ah, gotcha! Thanks for the explanation!

[-] over_clox@lemmy.world 2 points 1 day ago

Yeah, not exactly the easiest thing to set up and arrange, but it's definitely a bit of a Linux upskill challenge. I wouldn't categorize Termux as any sort of serious big boy daily driver nor gamer, but for most typical tasks, it gets the job done at least.

Here's one of the tutorial videos I found explaining ways to set it up with a graphical desktop...

https://www.youtube.com/watch?v=I__bpMIBj30

[-] over_clox@lemmy.world 1 points 1 day ago

I just caught your edit regarding pkg update, yeah that's like one of the first things I do before upgrading or installing any packages. Actually pkg is just an alias for apt anyways, same difference on Termux.

Once the GUI is all set up, synaptic package manager is also a nice healthy option to install πŸ‘

[-] leadore@lemmy.world 3 points 1 day ago* (last edited 1 day ago)

Check out lue: https://github.com/paulilaaso/lue

terminal-based , TTS, various formats supported. I've used it and it works on my system. (edit: I see you're on android, so not sure if that's supported. It's python.)

[-] over_clox@lemmy.world 2 points 1 day ago

Oof, that's gonna be a no-go for me. Though Termux is on Android, and actually is a variation of Linux, it's a very hacked distro, as it doesn't have access to the true / root folder, everything is stored in /data/data/com.termux/files/

So, every single program for Termux has to be modified and recompiled accordingly to comply. At least most mainline programs and packages are available and maintained, apparently lue isn't available, and I ain't in any hurry to modify and recompile it myself, but I probably could, if it was necessary.

I've installed Okular though and that works fine, plus pdftotext works fine in the terminal as well.

Thanks for the response and advice though πŸ‘

[-] leadore@lemmy.world 2 points 1 day ago
[-] over_clox@lemmy.world 1 points 1 day ago

Yep, apparently 100% supported πŸ‘

[-] leadore@lemmy.world 1 points 1 day ago

So theoretically it could work if you have proper python modules for the TTS? There's a command option to specify the TTS model. Just speculating.

[-] IanTwenty@piefed.social 4 points 1 day ago* (last edited 1 day ago)

PDF viewer

https://gitlab.gnome.org/GNOME/evince

For OCR maybe ocrpdf from

https://github.com/uroesch/pdftools

Edit: ah no, ocr not needed if it's text already. As someone else already said there's a tool for plain text extraction.

[-] loppy@fedia.io 3 points 1 day ago

Hard to get lighter weight than https://en.wikipedia.org/wiki/MuPDF

The frontend doesn't even really have a UI, just keyboard input.

[-] mycodesucks@lemmy.world 1 points 1 day ago

I second this. Once you know the navigation keys it's as blazing fast as you feel in your soul like navigating pdfs SHOULD be.

[-] palordrolap@fedia.io 3 points 1 day ago

Firefox can view PDFs so I assume Chrome also has that ability, and you're likely to already have one or the other if you're already using your computer for web browsing.

If you need something stand-alone, one of the Evince family might also suit your purpose. Evince = GNOME Document Viewer and XFCE is GTK-based, which seems like a good match. There's also Atril which is a MATE fork and Xreader, which is a fork of Atril, from Linux Mint's Xapps project.

LibreOffice, as mentioned by another respondent, has the ability to modify PDFs if not outright edit them, i.e. ability to place text boxes on top of the document, so you could theoretically use it to digitally complete a form you've been sent as a PDF and save it out as one. That may be worth jumping through the hoops if that sounds like a feature you might want.

[-] over_clox@lemmy.world 2 points 1 day ago

Yeah, I'm posting from Firefox right now, another commenter mentioned this just a few minutes ago. Honestly I'm not sure why the hell I didn't think to try that first LMFAO! Guess I'm a fucking idiot...

Obligatory, fuck Chrome though, I ain't got the space for their stupid weights.bin file, and I rather like the uBlock Origins plugin...

[-] palordrolap@fedia.io 2 points 1 day ago

My bad. I didn't see the other post about Firefox.

Not using Chrome solves the weights.bin problem, of course, but if I had no choice, I'd maybe replace weights.bin with a read-only zero-size file to see what happens.

[-] over_clox@lemmy.world 1 points 1 day ago

Hahaha! I like your train of thought, I'd love to know the results of a read-only zero-size weights.bin file!

For realz though, I'm running Termux on a tablet with only 3GB RAM and barely able to keep ~3.5GB storage space free at any given moment, so Chrome ain't getting any of my attention ya know..

[-] tal@lemmy.today 2 points 1 day ago

pdftotext go-1984.pdf

cat go-1984.txt | espeak

Looks like pdftotext go-1984.pdf -|espeak should let you drop the temporary file, if you want.

[-] over_clox@lemmy.world 2 points 1 day ago* (last edited 1 day ago)

Trying this right now, supposed to make espeak read the entire document...

pdftotext go-1984.pdf -|espeak --stdin

Edit: This works, reads the entire document and doesn't stop at line 200

[-] over_clox@lemmy.world 2 points 1 day ago

WTF espeak? It stops at line 200, the last words it speaks are "little boy screaming with fright"

Goddamnit, WTF espeak? Guess I need to look up the man/help file for espeak to convince it to read the whole document...

[-] over_clox@lemmy.world 2 points 1 day ago

Ahh, awesome sauce with cool beans, thanks fellow penguin!

[-] lambalicious@lemmy.sdf.org 2 points 1 day ago

reader

Atril and xpdf, I guess? Honestly I had never sat down to think and search this before.

[-] brickfrog@lemmy.dbzer0.com 1 points 1 day ago* (last edited 1 day ago)

The default .pdf viewer in your Linux distro should be enough.. on Debian Trixie with GNOME it seems to be Evince and it works well and lightweight (especially compared to anything Adobe related!). I don't know too much about Termux but I guess if you can install Evince in there then it should be fine.

Otherwise like others mentioned most web browsers nowadays can view .pdf files, people usually have a web browser already installed so that's probably the easiest solution unless you need/want something different.

[-] over_clox@lemmy.world 1 points 1 day ago

Oh that's funny, Termux ain't your regular cup of penguin tea. Initially, it doesn't even come with nano, the terminal based text editor. Termux runs on top of Android, non-rooted, and the base install might as well be like booting a barebones Linux terminal off of a few floppy disks.

So, there's no such thing as a default app that comes with the 'operating system', you basically gotta build it up yourself.

It's a fun journey though...

https://www.youtube.com/watch?v=I__bpMIBj30

[-] homesweethomeMrL@lemmy.world 1 points 1 day ago
[-] over_clox@lemmy.world 2 points 1 day ago

Easier said than done on Termux, that's not exactly immediately supported and is gonna take jumping through a few extra hoops to get installed. Sigh, I'll get to it one of these days...

[-] 2ndDegreeOWO@lemmy.world 1 points 1 day ago

Not very 'lightweight' if all you need it to do is read PDFs.

[-] homesweethomeMrL@lemmy.world 2 points 1 day ago

True. Although you can just get Writer which isn’t crazy big.

this post was submitted on 12 Nov 2026
34 points (97.2% liked)

Linux

19959 readers
70 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 3 years ago
MODERATORS