Skip to content

Instantly share code, notes, and snippets.

@bitmvr
Last active March 21, 2021 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitmvr/e25dcc81b381b9fafdb40acf9c04ef6c to your computer and use it in GitHub Desktop.
Save bitmvr/e25dcc81b381b9fafdb40acf9c04ef6c to your computer and use it in GitHub Desktop.
Install xpdf Japanese Language package

Install XPDF Japanese Language Package

Step 1: Download the Japanese Language Package

curl -sL https://dl.xpdfreader.com/xpdf-japanese.tar.gz -o "$HOME/Downloads/xpdf-japanese.tar.gz"

Step 2: Create the required directories and files.

mkdir -p /usr/local/share/xpdf/japanese
touch -p $HOME/.xpdfrc

Step 3: Extract the Japanese Language Package

tar -xvf "$HOME/Downloads/xpdf-japanese.tar.gz" -C "/usr/local/share/xpdf/japanese" --strip-components 1

Step 4: Add the Japanese files to the XPDF Configuration File.

  1. Copy the following content:
#----- begin Japanese support package (2011-sep-02)
cidToUnicode	Adobe-Japan1	/usr/local/share/xpdf/japanese/Adobe-Japan1.cidToUnicode
unicodeMap	ISO-2022-JP	/usr/local/share/xpdf/japanese/ISO-2022-JP.unicodeMap
unicodeMap	EUC-JP		/usr/local/share/xpdf/japanese/EUC-JP.unicodeMap
unicodeMap	Shift-JIS	/usr/local/share/xpdf/japanese/Shift-JIS.unicodeMap
cMapDir		Adobe-Japan1	/usr/local/share/xpdf/japanese/CMap
toUnicodeDir			/usr/local/share/xpdf/japanese/CMap
#----- end Japanese support package
  1. Paste it into $HOME/.xpdfrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment