Skip to content

Instantly share code, notes, and snippets.

@andrewodri
Created June 12, 2020 01:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewodri/a786285c0457925b75acb594ac7d70a5 to your computer and use it in GitHub Desktop.
Save andrewodri/a786285c0457925b75acb594ac7d70a5 to your computer and use it in GitHub Desktop.
Extract fonts from PDF

First, we need to open a shell to the PDF tools Docker container:

docker run --rm -it -v ${PWD}:/pdf gkmr/pdf-tools:latest /bin/sh

Then we need to run the following commands:

cd /pdf
wget https://raw.githubusercontent.com/Distrotech/ghostscript/distrotech-ghostscript-9.10/toolbin/extractFonts.ps
gs -q -dNODISPLAY ./extractFonts.ps -c "(/pdf/filename.pdf) extractFonts quit"
exit

Second, we need to open a shell to the font tools Docker container:

docker run --rm -it -v ${PWD}:/fonts sandinh/fonttools:latest /bin/sh

Then we need to run the following commands:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment