Using Ghostscript 8.71 in Ubuntu, but the problem is reading a PDF file with a temporary roman font on all its pages.
I downloaded the msttcorefonts package and created a Fontmap file for Ghostscript, but that just doesn't work.
My Fontmap file is as follows:
/Times (/usr/share/fonts/truetype/msttcorefonts/times.ttf); /Times-Roman (/usr/share/fonts/truetype/msttcorefonts/times.ttf); /Times-Bold (/usr/share/fonts/truetype/msttcorefonts/timesbd.ttf); /Times-BoldItalic (/usr/share/fonts/truetype/msttcorefonts/timesbi.ttf); /Times-Italic (/usr/share/fonts/truetype/msttcorefonts/timesi.ttf);
Ghostscript command that I use:
gs -sFONTMAP=/usr/share/ghostscript/8.71/Fontmap bad.pdf -o good.pdf
And this is the error I get:
GPL Ghostscript 8.71 (2010-02-10) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 3. Page 1 Error: /undefined in --run-- Operand stack: --dict:5/14(L)-- F2 11.0 FontObject --dict:8/8(L)-- --dict:8/8(L)-- 397 --dict:8/8(L)-- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 3 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1151/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:108/127(ro)(G)-- --dict:288/300(ro)(G)-- --dict:22/25(L)-- --dict:6/8(L)-- --dict:25/40(L)-- --dict:1151/1684(ro)(G)-- --dict:10/10(L)-- Current allocation mode is local Last OS error: 2 GPL Ghostscript 8.71: Unrecoverable error, exit code 1
Can someone help me with this? I feel that I have exhausted all the possibilities that I can think of.
Here is the PDF file that I am trying to run through Ghostscript: bad.pdf
If I download all fonts like this:
gs -c 'loadallfonts quit'
Then the only links to the Times New Roman font:
Loading TimesNewRomanPS-BoldItalicMT font from /usr/share/fonts/truetype/msttcorefonts/timesbi.ttf... 4310316 2923512 4001304 2206507 1 done.
Reading the properties of the attached PDF, I see that he really wants TimesNewRomainPSMT . Why doesn't gs download all the fonts in the msttcorefonts folder?