How to convert pdf to text in FreeBSD
How to convert pdf to text in FreeBSDA simple tool to extract or convert text from a pdf file (unprotected) to a text file is using "xpdf" port.
Code:
# cd /usr/ports/graphics/xpdf && make install clean
Opt out "X11 (graphics) support" if you're not interested in X11 support.
Example of converting pdf file to test file:Code:
# ls
simple.pdf
# /usr/local/libexec/xpdf/pdftotext simple.pdf
# ls
simple.pdf simple.txt
# cat simple.txt
A Simple PDF File
<PDF TEXT>
Simple PDF File 2
<PDF TEXT>
"pdftotext" utility from xpdf converts a pdf file to a new text file keeping the page numbering for reference.