# Terminal Challenge, View Word DOC File TACKER: paulmccombs (Paul McCombs) SUBJECT: Terminal Challenge. View Word DOC File DATE: 25-Aug-26 05:50:55 HOST: faeroes This is a follow-up to my post reporting success in printing a Word 97-2003 version .DOC file on my FreeBSD 15 console only Raspberry Pi 4. I asked this board if they had any lighter solutions than using Libre Office with the `--headless' option witch was a 1GB install. I got several suggestions to try from sj, migs, jgw, and taviso. These suggestions grew the challenge from just printing to also viewing on screen. This is probably more detail than anyone wants, but that is the nature of my flavor of neurodiversity. I'm putting my conclusions before the detail. Thanks to all who responded to my post. I love the discussion here. ## My conclusions: * If you are dealing with standard prose, I would use antiword† either alone or in conjunction with Midnight Commander to view a Word .DOC file at the command line. * Based on one test case of a calendar document, I would use Libre Office with the `--headless' option to convert table heavy documents to PDF which allows me to print via CUPS or to view in Midnight Commander. † Originally I mistakenly recommended catdoc rather than antiword. They are very close, but antiword is slightly better, and is in fact what Midnight Commander is using. Sorry for the error. ## Suggestions from bboard on sdf.org 1. strings – print the strings of printable characters in files - sj - `strings file.pdf | more' - Produced screens full of unhelpful text. - `strings file.doc | more' - Provided all the relevant text, but stripped the calendar's structure so it's not clear which day events are on. +---- | bjbj! | August/Sept 2026 Calendar for SC Football | TUES | THUR | AUG. | 2026 | 4:30pm | *Player Check-In/Gear | *Team Meeting | *6:30pm Parent | ZOOM Meeting | 19 | Varsity/JV/C-team | Practice | 3:00pm-6:30pm | Varsity/JV/C-team | Practice #1 | 3:00pm-5:30pm +---- 2. Midnight Commander: file manager - migs/sj - `mc -v file.doc' - I had two different results with this, I think I understand why. The first time it provided the same result as strings, which was already available on my machine. See the strings example above. - I subsequently installed both catdoc and antiword, and now it provides the same result as antiword. See the antiword example below. - `mc -v file.pdf' - This is serviceable assuming you can make your terminal wide enough. This is the best on-screen result I have found. - I couldn't copy text from my macOS terminal from Midnight Commander so I'm providing a screen shot. => ../images/mc_file.pdf.webp 3. catdoc - reads MS-Word file and puts its content as plain text on standard output - jgw - `catdoc -f ascii file.doc' - This is fundamentally better than strings as it keeps the day of the month with the entries for that day. +---- | August/Sept 2026 Calendar for SC Football | | SUN MON TUES WED THUR FRI SAT | | 16 | | AUG. | | 2026 | | 17 | | OFF | | 18 | | 4:30pm | | *Player Check-In/Gear | | *Team Meeting | | *6:30pm Parent | | ZOOM Meeting 19 | | Varsity/JV/C-team | | Practice | | 3:00pm-6:30pm | | 20 | | Varsity/JV/C-team | | Practice #1 | | 3:00pm-5:30pm +---- - I looked at the `-f tex' format option, but it wasn't simple and didn't look promising based on the tex code generated. 4. antiword - show the text and images of MS Word documents - taviso - Similar to catdoc, but has a vertical pip to separate the cells in the table that forms the calendar. This is probably usable to get the information, but fails to be formatted as a traditional paper calendar. +---- | | August/Sept 2026 Calendar for SC Football | SUN |MON |TUES |WED |THUR |FRI |SAT | |16 | | AUG. | 2026 | | |17 | | OFF | | |18 | 4:30pm | *Player Check-In/Gear | *Team Meeting | | *6:30pm Parent | ZOOM Meeting |19 | | Varsity/JV/C-team | Practice | 3:00pm-6:30pm | | |20 | Varsity/JV/C-team | Practice #1 | 3:00pm-5:30pm +---- 5. pdftohtml - program to convert PDF files into HTML, XML and PNG image - sj - I'm using elinks to view the resulting file.html - Using default output option: `pdftohtml file.pdf' - This is fairly comparable to strings, but with less spurious text. +---- | August/Sept 2026 Calendar for SC Football | SUN | MON | TUES | WED | THUR | FRI | SAT | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 4:30pm | Varsity/JV/C-team | Varsity/JV/C-team | Varsity/JV | AUG. | OFF | *Player Check-In/Gear | Varsity/JV/C-team | Practice #1 | Practice #1 | Practice | 2026 | *Team Meeting | Practice | 3:00pm-5:30pm | 3:00pm-5:30pm | 8:30am - 10:30am | 3:00pm-6:30pm | *6:30pm Parent | *Varsity/JV | *Varsity/JV | ZOOM Meeting | Practice #2 | Practice #2 | 7:30pm – 9:00pm | 7:30pm – 9:00pm +---- - Using the generate complex output option: `pdftohtml FBAugSeptCal2026.pdf -c' - For console purposes this is fairly comparable to antiword and catdoc but does handle the 19th of August consistently. +---- | background image | | August/Sept 2026 Calendar for SC Football | | SUN | | MON | | TUES | | WED | | THUR | | FRI | | SAT | | 16 | | AUG. | | 2026 | | 17 | | OFF | | 18 | | 4:30pm | | | | | | *Player Check-In/Gear | | *Team Meeting | | *6:30pm Parent | ZOOM Meeting | | 19 | | Varsity/JV/C-team | | Practice | | 3:00pm-6:30pm | | 20 | Varsity/JV/C-team | | Practice #1 | | 3:00pm-5:30pm +---- - To be fair to pdftohtml viewing the result in a graphical web browser produces a perfect result. => ../images/pdftohtml-c.webp Updated 2026-8-28 © 2026 Paul McCombs This text is available under the Creative Commons Attribution-ShareAlike 4.0 License => https://en.wikipedia.org/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License CC BY-SA 4.0