Ghostscript: выдает ошибку при конвертации - PullRequest
0 голосов
/ 25 февраля 2020

У меня есть PDF-файл, который мне нужно конвертировать с помощью ghostscript. К сожалению, я не смогу поделиться PDF, поскольку он принадлежит клиенту. Я пытаюсь отладить команду gsnd -dPDFDEBUG. Когда я впервые запустил его, я получил следующую ошибку:

556 547 547 781 781 578 578 578 578 578 578 578 578 667 667 813 813 813 813 813 813 556 556 556 556 556 556 556 556 820 820 1015 1015 1015 1015 1015 1015 781 781 781 781 781 781 781 781 796 796 992 992 943 943 943 943 578 578 578 578 578 578 578 667 667 667 667 667 333 333 333 333 333 556 556 556 556 556 813 813 869 869 722 333 333 333 222 222 222 222 222 222 278 278 424 424 333 333 333 547 547 547 547 569 569 547 547 667 667 862 887 765 333 333 333 781 781 781 781 781 924 827 894 796 747 333 333 556 ]
2815 [
722 ]
]
/FontDescriptor 11 0 R
/DW 1000 /BaseFont /Arial >>
endobj
%Resolving: [11 0]
<<
/StemV 50 /ItalicAngle 0 /Type /FontDescriptor /FontName /Arial /Ascent 905 /Flags 32 /FontBBox [
-665 -325 2000 1006 ]
/CapHeight 716 /Descent -211 >>
endobj
%Resolving: [11 0]
Can't find CID font "Arial".
Attempting to substitute CID font /Adobe-Identity for /Arial, see doc/Use.htm#CIDFontSubstitution.
The substitute CID font "Adobe-Identity" is not provided either. attempting to use fallback CIDFont.See doc/Use.htm#CIDFontSubstitution.
The fallback CID font "CIDFallBack" is not provided.  Finally attempting to use ArtifexBullet.
   **** Error reading a content stream. The page may be incomplete.
               Output may be incorrect.
   **** Error: File did not complete the page properly and may be damaged.
               Output may be incorrect.

Затем я скачал файл Arial.ttf, скопировал его в каталог /usr/share/ghostscript/current/Resource/CIDFont/ и переименовал в Arial. После выполнения этого при выполнении команды я получаю следующее:

> 2690 [ 556 547 547 781 781 578 578 578 578 578 578 578 578 667 667 813
> 813 813 813 813 813 556 556 556 556 556 556 556 556 820 820 1015 1015
> 1015 1015 1015 1015 781 781 781 781 781 781 781 781 796 796 992 992
> 943 943 943 943 578 578 578 578 578 578 578 667 667 667 667 667 333
> 333 333 333 333 556 556 556 556 556 813 813 869 869 722 333 333 333
> 222 222 222 222 222 222 278 278 424 424 333 333 333 547 547 547 547
> 569 569 547 547 667 667 862 887 765 333 333 333 781 781 781 781 781
> 924 827 894 796 747 333 333 556 ] 2815 [ 722 ] ] /FontDescriptor 11 0
> R /DW 1000 /BaseFont /Arial >> endobj %Resolving: [11 0] << /StemV 50
> /ItalicAngle 0 /Type /FontDescriptor /FontName /Arial /Ascent 905
> /Flags 32 /FontBBox [
> -665 -325 2000 1006 ] /CapHeight 716 /Descent -211 >> endobj %Resolving: [11 0]    **** Error: can't process embedded font stream,
>         attempting to load the font using its name.
>                Output may be incorrect.    **** Error reading a content stream. The page may be incomplete.
>                Output may be incorrect.    **** Error: File did not complete the page properly and may be damaged.
>                Output may be incorrect.

Это на основе Docker на основе Ubuntu. На отдельном Macbook это работает нормально. Пожалуйста, дайте мне знать, что мне не хватает. Спасибо.

...