The problem was in pdftotext, rather than ps2pdf. Starting from the v. 10.0.0 of Ghostscript, pdftotext produces correct output from the attached PDF file. Regards, Alex Cherepanov