Problem with pdf to jpg: fonts?
Posted: 2009-03-25T10:43:03-07:00
I'm having issues trying to convert pdfs to jpg -- and even just using the identify command on these pdfs.
Using Ghostscript 8.50 with Imagemagick 6.2.5 on linux.
Does every single font used in a pdf need to be on your system if it's not embedded in the pdf itself? I was under the impression it should just substitute fonts if they are missing, but obviously something is wrong. Is there a way i can get past any missing fonts just to convert and identify pdfs? I know this pdf uses fonts from the Arial family which is not listed on my system in the type-ghostscript.xml file.
**** Warning: File has a corrupted %%EOF marker, or garbage after %%EOF.
**** Warning: Fonts with Subtype = /TrueType should be embedded.
But ArialMT is not embedded.
Error: /invalidfont in findfont
Operand stack:
--dict:7/7(L)-- TT0 1 --dict:8/8(L)-- --dict:8/8(L)-- ArialMT --dict:13/13(L)-- Helvetica Helvetica Font Helvetica 427313 Helvetica --nostringval-- Helvetica NimbusSanL-Regu Courier NimbusMonL-Regu
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 35 --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-- 9 9 %oparray_pop 10 9 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 13 10 %oparray_pop --nostringval-- --nostringval-- --nostringval-- 1 -1 1 --nostringval-- %for_neg_int_continue
Dictionary stack:
--dict:1125/1686(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:105/127(ro)(G)-- --dict:247/347(ro)(G)-- --dict:21/24(L)-- --dict:4/6(L)-- --dict:25/32(L)-- --dict:17/17(ro)(G)-- --dict:1125/1686(ro)(G)--
Current allocation mode is local
Last OS error: 2
AFPL Ghostscript 8.50: Unrecoverable error, exit code 1
[/code]
your help is appreciated, thank you.
P.S. If I run GS on the file I get the following - which looks like it's trying to substitute but cant?
my gs -h shows and that is not where the fonts are
but they are in:
/usr/share/fonts/default/Type1
so how can i change ghostscript to look there?
Using Ghostscript 8.50 with Imagemagick 6.2.5 on linux.
Does every single font used in a pdf need to be on your system if it's not embedded in the pdf itself? I was under the impression it should just substitute fonts if they are missing, but obviously something is wrong. Is there a way i can get past any missing fonts just to convert and identify pdfs? I know this pdf uses fonts from the Arial family which is not listed on my system in the type-ghostscript.xml file.
**** Warning: File has a corrupted %%EOF marker, or garbage after %%EOF.
**** Warning: Fonts with Subtype = /TrueType should be embedded.
But ArialMT is not embedded.
Error: /invalidfont in findfont
Operand stack:
--dict:7/7(L)-- TT0 1 --dict:8/8(L)-- --dict:8/8(L)-- ArialMT --dict:13/13(L)-- Helvetica Helvetica Font Helvetica 427313 Helvetica --nostringval-- Helvetica NimbusSanL-Regu Courier NimbusMonL-Regu
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 35 --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-- 9 9 %oparray_pop 10 9 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 13 10 %oparray_pop --nostringval-- --nostringval-- --nostringval-- 1 -1 1 --nostringval-- %for_neg_int_continue
Dictionary stack:
--dict:1125/1686(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:105/127(ro)(G)-- --dict:247/347(ro)(G)-- --dict:21/24(L)-- --dict:4/6(L)-- --dict:25/32(L)-- --dict:17/17(ro)(G)-- --dict:1125/1686(ro)(G)--
Current allocation mode is local
Last OS error: 2
AFPL Ghostscript 8.50: Unrecoverable error, exit code 1
[/code]
your help is appreciated, thank you.
P.S. If I run GS on the file I get the following - which looks like it's trying to substitute but cant?
Code: Select all
AFPL Ghostscript 8.50 (2004-12-10)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
**** Warning: File has a corrupted %%EOF marker, or garbage after %%EOF.
Processing pages 1 through 35.
Page 1
**** Warning: Fonts with Subtype = /TrueType should be embedded.
But ArialMT is not embedded.
Substituting font Helvetica for ArialMT.
Can't find (or can't open) font file n019003l.pfb.
Can't find (or can't open) font file /usr/local/share/ghostscript/8.50/Resource/Font/NimbusSanL-Regu.
Can't find (or can't open) font file NimbusSanL-Regu.
Can't find (or can't open) font file /usr/local/share/ghostscript/8.50/Resource/Font/NimbusSanL-Regu.
Can't find (or can't open) font file NimbusSanL-Regu.
Querying operating system for font files...
Didn't find this font on the system!
Substituting font Courier for NimbusSanL-Regu.
Can't find (or can't open) font file n022003l.pfb.
Can't find (or can't open) font file /usr/local/share/ghostscript/8.50/Resource/Font/NimbusMonL-Regu.
Can't find (or can't open) font file NimbusMonL-Regu.
Can't find (or can't open) font file /usr/local/share/ghostscript/8.50/Resource/Font/NimbusMonL-Regu.
Can't find (or can't open) font file NimbusMonL-Regu.
Didn't find this font on the system!
Unable to substitute for font.
Error: /invalidfont in findfont
Operand stack:
--dict:7/7(L)-- TT0 1 --dict:8/8(L)-- --dict:8/8(L)-- ArialMT --dict:13/13(L)-- Helvetica Helvetica Font Helvetica 308107 Helvetica --nostringval-- Helvetica NimbusSanL-Regu Courier NimbusMonL-Regu
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 35 --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-- 9 9 %oparray_pop 10 9 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 13 10 %oparray_pop --nostringval-- --nostringval-- --nostringval-- 1 -1 1 --nostringval-- %for_neg_int_continue
Dictionary stack:
--dict:1116/1686(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:105/127(ro)(G)-- --dict:247/347(ro)(G)-- --dict:21/24(L)-- --dict:4/6(L)-- --dict:25/32(L)-- --dict:17/17(ro)(G)-- --dict:1116/1686(ro)(G)--
Current allocation mode is local
Last OS error: 2
AFPL Ghostscript 8.50: Unrecoverable error, exit code 1
my gs -h shows and that is not where the fonts are
Code: Select all
Search path:
. : /usr/local/share/ghostscript/8.50/lib :
/usr/local/share/ghostscript/8.50/Resource :
/usr/local/share/ghostscript/fonts
/usr/share/fonts/default/Type1
so how can i change ghostscript to look there?