<div dir="ltr">Hi all, <div><br></div><div style>I have a PostScript file generated from a PDF by pdftops 0.22.3, which cannot be interpreted neither by printer nor by GhostScript. I figured that removing this stance of code (marked with >) makes GhostScript happy, but cannot understand what exactly is wrong with it. </div>
<div style><br></div><div style>Here is the code:</div><div style><br></div><div style><div><font face="courier new, monospace"> 0 0 Td</font></div><div><font face="courier new, monospace"> [1 0 0 -1 139 18] Tm</font></div>
<div><font face="courier new, monospace"> 0 0 Td</font></div><div><font face="courier new, monospace">> /F12_0 13.3333 Tf</font></div><div><font face="courier new, monospace">> (\012\355)</font></div><div><font face="courier new, monospace">> [13.3333</font></div>
<div><font face="courier new, monospace">> 0] Tj</font></div><div><font face="courier new, monospace">> [1 0 0 1 0 0] Tm</font></div><div><font face="courier new, monospace">> 0 0 Td</font></div><div><font face="courier new, monospace">> [1 0 0 -1 139 18] Tm</font></div>
<div><font face="courier new, monospace">> 0 0 Td</font></div><div><font face="courier new, monospace"> /F11_0 13.3333 Tf</font></div><div><font face="courier new, monospace"> (\000\003)</font></div><div><font face="courier new, monospace"> [3.704417</font></div>
<div><br></div><div style>F12_0 represents embedded DejaVuSans font. </div><div style>I assume that Tj is a standard procedure inserted by poppler, but will copy it here just in case:</div><div style><br></div><div><div>
<font face="courier new, monospace">/Tj {</font></div>
<div><font face="courier new, monospace"> fCol</font></div><div><font face="courier new, monospace"> 0 pdfTextRise pdfTextMat dtransform rmoveto</font></div><div><font face="courier new, monospace"> currentpoint 4 2 roll</font></div>
<div><font face="courier new, monospace"> pdfTextRender 1 and 0 eq {</font></div><div><font face="courier new, monospace"> 2 copy xyshow2</font></div><div><font face="courier new, monospace"> } if</font></div><div><font face="courier new, monospace"> pdfTextRender 3 and dup 1 eq exch 2 eq or {</font></div>
<div><font face="courier new, monospace"> 3 index 3 index moveto</font></div><div><font face="courier new, monospace"> 2 copy</font></div><div><font face="courier new, monospace"> currentfont /FontType get 3 eq { fCol } { sCol } ifelse</font></div>
<div><font face="courier new, monospace"> xycp currentpoint stroke moveto</font></div><div><font face="courier new, monospace"> } if</font></div><div><font face="courier new, monospace"> pdfTextRender 4 and 0 ne {</font></div>
<div><font face="courier new, monospace"> 4 2 roll moveto xycp</font></div><div><font face="courier new, monospace"> /pdfTextClipPath [ pdfTextClipPath aload pop</font></div><div><font face="courier new, monospace"> {/moveto cvx}</font></div>
<div><font face="courier new, monospace"> {/lineto cvx}</font></div><div><font face="courier new, monospace"> {/curveto cvx}</font></div><div><font face="courier new, monospace"> {/closepath cvx}</font></div>
<div><font face="courier new, monospace"> pathforall ] def</font></div><div><font face="courier new, monospace"> currentpoint newpath moveto</font></div><div><font face="courier new, monospace"> } {</font></div><div>
<font face="courier new, monospace"> pop pop pop pop</font></div><div><font face="courier new, monospace"> } ifelse</font></div><div><font face="courier new, monospace"> 0 pdfTextRise neg pdfTextMat dtransform rmoveto</font></div>
<div><font face="courier new, monospace">} def</font></div></div><div><br></div><div style>Here is how GhostScript complains about it:</div><div style><br></div><div><div>...</div><div>resmp FindResource beg F12_0</div><div>
resmp FindResource end</div><div>Error: /rangecheck in --xyshow--</div><div>Operand stack:</div><div> 139.0 18.0 (\n\355) --nostringval-- (\n\355) --nostringval--</div><div>Execution stack:</div><div> %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval--</div>
<div>Dictionary stack:</div><div> --dict:1158/1684(ro)(G)-- --dict:1/20(G)-- --dict:85/200(L)-- --dict:74/75(L)-- --dict:19/25(L)-- --dict:0/15(L)-- --dict:0/15(L)-- --dict:10/15(L)--</div><div>Current allocation mode is local</div>
<div>Last OS error: Resource temporarily unavailable</div><div>Current file position is 345679</div><div>GPL Ghostscript 9.06: Unrecoverable error, exit code 1</div></div><div><br></div><div style>I assume the problem is with how the original PDF embeds the font, but cannot really understand why Tj would fail on those parameters. </div>
<div><br></div><div style>Could someone please have a look and give me a hint on why is this happening?</div><div style>Thanks in advance. </div><div style><br></div><div style>Unfortunately, the original doc cannot be provided because it's full of confidential information. </div>
</div></div>