Search code examples
ghostscriptcyrillicpcl6

Convert PCL to PDF using ghostscript: cyrillic problem


I have simple PCL file in Windows 1251 code page:

<ESC>E<ESC>&l6D<ESC>&a1L<ESC>&l1E<ESC>(9R<ESC>(s0p10.00h0s0b4099T
Привет! (it means Hello!)

When I convert it to pdf with gpcl6win32.exe from ghostscript 9.28:

gpcl6win32.exe -dNOPAUSE -sDEVICE=pdfwrite -dNOCACHE -sOutputFile=output.pdf input.pcl

I get unreadable cyrillic glyphs in output.pdf because there are no cyrillic glyphs in NimbusMono-Regular selected for Courier font (4099): enter image description here

What is correct way to make it correct PDF with cyrillic glyphs?

Thank you for any hints!


Solution

  • You need to use a font which contains Cyrillic glyphs. The simplest solution is to embed a soft font in the PCL. Otherwise you could try defining a different Courier font by editing fontmap.GS.

    If you want to try that you will need to find a version of Courier which contains the Cyrillic glyphs, since you are presumably using Windows, you could try using the Windows version of Courier.