GhostScript Error

In a specific PDF file when you run the following command:

gs -dSAFER -dBATCH -dNOPAUSE -dQUIET -dFirstPage=1 -dLastPage=1 -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf

I get this error:

GPL Ghostscript 8.71: Warning: 'loca' length 188 is greater than numGlyphs 93 in the font MGOXZX+Arial-BoldMT.

Any ideas what this error means and how to solve the problem?

+3
source share
1 answer

First, Ghostscript did not declare this as an “error,” but a “warning.” This is a pretty big difference.

Secondly, you asked Ghostscript to display the first page of input in PDF format. Did it work? Do you see any visible differences when comparing output.pdf and the first page of input.pdf?

Third, if there is really a problem, you should indicate which version of Ghostscript you are using. the most recent of them is 8.71 .


: , StackOverflowNewbie Ghostscript, ...

"" : ( - PDF), .

"" : , Ghostscript ; , , PDF.

. , , - . StackOverflowNewbie , .

, : -dDEBUG :

gs \
  -sOutputFile=output.pdf \
  -dDEBUG \
  -dLastPage=1 \
  -sDEVICE=pdfwrite \
   input.pdf

! stderr/stdout .

, ( , , , PDF-), , ( -dDEBUG) , :

 -dPDFDEBUG      # (debug PDF Interpreter)
 -dPDFWRDEBUG    # (debug PDF Writer)
 -dTTFDEBUG      # (debug TTF Fonts)
 -dCCFONTDEBUG   # (debug compiled-in Fonts)
 -dFAPIDEBUG     # (debug Font API)
 -dCFFDEBUG      # (debug CFF Fonts)
 -dCMAPDEBUG     # (debug CMAP)
 -dDOCIEDEBUG    # (debug CIE color)
 -dSETPDDEBUG    # (debug setpagedevice)
 -dSTRESDEBUG    # (debug Static Resources)
 -dVGIFDEBUG     # (debug ViewGIF)
 -dVJPGDEBUG     # (debug ViewJPEG)
 -dINITDEBUG     # (debug Initialization)
 -dEPSDEBUG      # (debug EPS handling)
 -dPDFOPTDEBUG   # (debug PDF Optimizer/Linearizer)

, Arial-BoldMT, , pdfinfo pdffonts

 pdfinfo -f 1 -l 1 -box input.pdf
 pdfinfo -box output.pdf
 pdffonts -f 1 -l 1 input.pdf
 pdffonts output.pdf

Update2:

PDF . ( , , , SO-, " PDF ?" " ?" )

+3

Source: https://habr.com/ru/post/1765215/


All Articles