Sample Header Ad - 728x90

Using gs (Ghostscript) to extract fonts from PDF

0 votes
0 answers
945 views
I;m tried to use Ghostscript to extract fonts from PDF file. GPL Ghostscript 9.53.3 (2020-10-01) I downloaded extractFonts.ps tool and put it in same folder with PDF file. I also set permissions for extractFonts.ps: 'Allow this file to run as program'. Tried to extract, but got error: ~/Downloads/Helvetica/test$ gs \ -q -dNODISPLAY \ /home/labocomp/Downloads/Helvetica/test/extractFonts.ps \ -c "(/home/labocomp/Downloads/Helvetica/test/10.pdf) extractFonts quit" Error: /invalidfileaccess in --file-- Operand stack: (/home/labocomp/Downloads/Helvetica/test/10.pdf) (r) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- Dictionary stack: --dict:730/1123(ro)(G)-- --dict:0/20(G)-- --dict:78/200(L)-- Current allocation mode is local Last OS error: Permission denied GPL Ghostscript 9.53.3: Unrecoverable error, exit code 1 Tried also command: gs -q -dNODISPLAY extractFonts.ps -c "(10.pdf) extractFonts quit > > doesn't extract anything. Where is a problem?
Asked by Lexx Luxx (1463 rep)
Jul 29, 2022, 12:18 PM
Last activity: Jul 29, 2022, 02:56 PM