Last active
May 7, 2018 09:26
-
-
Save tokestermw/111dcdc46ad1c8eac663bd7378490ca5 to your computer and use it in GitHub Desktop.
Make pdftotext compatible with Japanese text on Mac OS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -- set up repos | |
brew install Caskroom/cask/xquartz | |
# -- install xpdf | |
brew install xpdf | |
# -- download japanese package | |
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-japanese.tar.gz | |
# -- open | |
tar -xzvf xpdf-japanese.tar.gz | |
# -- make required directory | |
mkdir /usr/local/share/xpdf | |
mkdir /usr/local/share/xpdf/japanese | |
# -- copy over the japanese files | |
cp -r xpdf-japanese/ /usr/local/share/xpdf/japanese | |
# -- check location of xpdf | |
brew ls xpdf | |
# -- copy over contents of add-to-xpdfrc to xpdfrc | |
cat xpdf-japanese/add-to-xpdfrc >> /usr/local/Cellar/xpdf/3.04_1/etc/xpdfrc | |
# -- now test with a pdf with Japanese | |
pdftotext random.pdf random.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment