cups-filters icon indicating copy to clipboard operation
cups-filters copied to clipboard

Some characters are not printed correctly

Open YuGiOhJCJ opened this issue 4 years ago • 6 comments

Hello, I am on Slackware 14.2 (64-bit) and I am using:

  • cups-2.3.3op2
  • cups-filters-1.28.10
  • qpdf-10.3.2

I try to print a PDF file lp myfile.pdf but the result is a sheet with some characters replaced with a square symbol. The PDF file characters are shown correctly on xpdf and mupdf PDF viewers, the problem is just when I print with my printers (tested on two different printers).

I found a workaround. I am using:

  • xpdf-4.03

Instead of using the lp myfile.pdf command I am using the xpdf myfile.pdf command then I click on File > Print... > Print. The result is perfect. However, I would like to use the lp command because I prefer this command line tool.

How can I get the same result as xpdf with the lp command please?

Thank you. Best regards.

Note: This issue was originally posted at the wrong place https://github.com/apple/cups/issues/5959

YuGiOhJCJ avatar Sep 13 '21 12:09 YuGiOhJCJ

Could you please attach he PDF file(s) which you wanted to print to this bug report?

How did you set up your printer? Could you attach your printer's PPD file (in /etc/cups/ppd/, take a copy of it, rename it to have a .txt file name extension).

Could you provide the CUPS error_log (in debug mode) for us? Please run the command cupsctl --debug-logging in a terminal window, then print the file again, wait until the job comes out of your printer, and after that, copy your /var/log/cups/error_log file, rename the copy to have a .txt file name extension, and attach it to this bug report.

tillkamppeter avatar Jan 05 '22 13:01 tillkamppeter

Could you please attach he PDF file(s) which you wanted to print to this bug report?

Here is the PDF file: myfile.pdf

How did you set up your printer? Could you attach your printer's PPD file (in /etc/cups/ppd/, take a copy of it, rename it to have a .txt file name extension).

I used the web interface to set up my printer: http://localhost:631/ Here is the /etc/cups/ppd/lexmark-ms312dn.ppd file: lexmark-ms312dn.ppd.txt

Could you provide the CUPS error_log (in debug mode) for us? Please run the command cupsctl --debug-logging in a terminal window, then print the file again, wait until the job comes out of your printer, and after that, copy your /var/log/cups/error_log file, rename the copy to have a .txt file name extension, and attach it to this bug report.

I did:

$ sudo cupsctl --debug-logging
$ lp myfile.pdf 
request id is lexmark-ms312dn-48 (1 file(s))

Here is the /var/log/cups/error_log file: error_log.txt Here is the result: output.pdf As you can see there are some strange characters at the bottom of the page with some squares (above "Après avoir vérifié").

YuGiOhJCJ avatar Jan 06 '22 06:01 YuGiOhJCJ

Hi @YuGiOhJCJ , Can you please run the command gs myfile.pdf on the terminal and attach the output displayed and the logs on the terminal?

Thanks

vermamohit13 avatar Jan 12 '22 20:01 vermamohit13

Here is the output displayed: gs-myfile.pdf.pdf There are several pages in this output corresponding to each time I press the Return key.

YuGiOhJCJ avatar Jan 13 '22 05:01 YuGiOhJCJ

Hi @YuGiOhJCJ ,

Thanks for the output. Kindly observe the strange characters.

The cupsfilter (pdftops) uses gs (Ghostscript) to convert PDF files to PS (postscript). However, the ghostscript is not able to find the CID Font "TimesNewRoman" because of which strange letters are being printed in the output, which you can observe in gs-myfile.pdf.pdf and ultimately results in strange characters being printed. So, the problem lies with Ghostscript, not with cupsfilters.

I have gone through some posts to solve your problem with ghostscript.Things you can try out:

  1. Try updating your ghostscript to the latest version and see if it works by using the command gs myfile.pdf and check for strange characters. (Ghostscript latest verion is 9.55).

  2. You can try solving this bug by following the thread - https://bugs.ghostscript.com/show_bug.cgi?id=691513

  3. If that doesn't work, you can search for other solutions available online (You can easily find out that many people are having this problem) or raise an issue at Ghostscript.

Thanks,

vermamohit13 avatar Jan 13 '22 06:01 vermamohit13

One remark: On Ubuntu 21.10 evince (Poppler-based) displays the PDF correctly, whereas Ghostscript 9.55.0 (the newest from upstream, not the one of the distro) shows the problem. I recommend reporting the problem to Ghostscript.

tillkamppeter avatar Jan 13 '22 12:01 tillkamppeter

I can confirm, the problem was Ghostscript. I upgraded from Ghostscript 9.19 to Ghostscript 9.56.1 and now all the characters are printed correctly. Also, when I run the command gs myfile.pdf the output is now correct. Problem fixed. Thanks.

YuGiOhJCJ avatar Nov 07 '22 12:11 YuGiOhJCJ