So, I have a text file, embedded with troff formatting commands. However, my printer is currently broken, but I want to see what the file looks like, so I can make sure everything is correct. Is there a program that can interpret the commands and show me a file preview? It has to exist. I probably sound really dumb right now, but I cant find info on this matter. somewhere on the Internet it said to use proof or page, but neither of those commands exist on my system.
Asked
Active
Viewed 819 times
1
-
Did you really send your file to your printer, just to proof it? See https://forums.freebsd.org/viewtopic.php?f=46&t=44703 for how to send it to a PostScript file, which can be viewed directly (OX Preview; Ghostscript) or further processed into a PDF. – Jongware Apr 14 '14 at 20:50
-
I didn't send anything to my printer because it isn't working i'm looking for a way to preview the file in a window. you mentioned Ghost script bu that isn't on my system either – user3002620 Apr 15 '14 at 02:17
1 Answers
2
troff
allows you to output to an ASCII text file with:
troff -a x.roff
If you have groff
installed, then you can convert it to:
- ASCII text
groff -Tascii x.roff > x.txt
- HTML
groff -Thtml x.roff > x.html
- or DVI
groff -Tdvi x.roff > x.dvi
If you have ps2pdf
, you can try to convert your postscript file to a PDF (ps2pdf x.ps
).
There are also online services to convert a ps file to a PDF; such as http://www.ps2pdf.com.

Alexander
- 59,041
- 12
- 98
- 151

user3512334
- 21
- 1