Summary: | Text missing in print | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | devurandom |
Component: | Text | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | chris.liddell, oldium.pro |
Priority: | P4 | ||
Version: | 9.00 | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: |
PDF showing the email which creates the problem
Job data captured from /var/spool/cups Shell script to catch arguments and environment |
Description
devurandom
2011-02-14 08:49:53 UTC
(In reply to comment #0) > When printing it, on the smiley is printed as a graphical emoticon, the text is > not printed. > > A print-to-pdf file is attached. It displays correctly in Okular, so maybe it > does not contain the problem at all. If it does not, please advise me how to > produce a proper testcase. I'm not sure what the problem is here. Are you trying to print the attached PDF file using Ghostscript ? If so then the file renders correctly for me. Ghostscript consumes either PDF or PostScript, if you are still having problems then what I need is the original PDF or PostScript file which is sent to Ghostscript, and the command line supplied to Ghostscript. Trying ./gs email-without-text.print.pdf dispays the text properly for me on Windows and Fedora using the released 9.0 version of Ghostscript. (In reply to comment #1) > Ghostscript consumes either PDF or PostScript, if you are still having problems > then what I need is the original PDF or PostScript file which is sent to > Ghostscript, and the command line supplied to Ghostscript. How do I make CUPS save that? > Trying ./gs email-without-text.print.pdf dispays the text properly I tried the command, too. I crashes: --- $ gs Documents/email-without-text.print.pdf GPL Ghostscript 9.00 (2010-09-14) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 1. Page 1 Error: /unknownerror in --run-- Operand stack: --dict:7/16(L)-- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1894 1 3 %oparray_pop 1893 1 3 %oparray_pop 1877 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- Dictionary stack: --dict:1155/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)-- --dict:82/200(L)-- --dict:108/127(ro)(G)-- --dict:293/300(ro)(G)-- --dict:23/30(L)-- --dict:6/8(L)-- --dict:21/40(L)-- --dict:1/1(ro)(G)-- --dict:7/15(L)-- --dict:1/1(ro)(G)-- Current allocation mode is local Last OS error: 2 GPL Ghostscript 9.00: Unrecoverable error, exit code 1 --- (In reply to comment #2) > (In reply to comment #1) > > Ghostscript consumes either PDF or PostScript, if you are still having problems > > then what I need is the original PDF or PostScript file which is sent to > > Ghostscript, and the command line supplied to Ghostscript. > How do I make CUPS save that? I'm sorry I am not a CUPS expert, I have no idea. > > Trying ./gs email-without-text.print.pdf dispays the text properly > I tried the command, too. I crashes: > --- > $ gs Documents/email-without-text.print.pdf > GPL Ghostscript 9.00 (2010-09-14) > Copyright (C) 2010 Artifex Software, Inc. All rights reserved. > This software comes with NO WARRANTY: see the file PUBLIC for details. > Processing pages 1 through 1. > Page 1 > Error: /unknownerror in --run-- This is not a crash, it is a graceful exit due to an error. I'm not certain what is causing the error though. You might try upgrading to the current version, 9.01 was released last week. What happens if you simply invoke Ghostscript with no parameters ? (In reply to comment #2) > (In reply to comment #1) > > Ghostscript consumes either PDF or PostScript, if you are still having problems > > then what I need is the original PDF or PostScript file which is sent to > > Ghostscript, and the command line supplied to Ghostscript. > How do I make CUPS save that? See here for details: https://wiki.edubuntu.org/DebuggingPrintingProblems#Capturing%20print%20job%20data (In reply to comment #3) > I'm not certain what is causing the error though. You might try upgrading to > the current version, 9.01 was released last week. What happens if you simply > invoke Ghostscript with no parameters ? An empty window is displayed and a command prompt is created on the console. I'll request packaging 9.01 in Gentoo, with less patches hopefully. I'll test again when that's done. (In reply to comment #5) > (In reply to comment #3) > > I'm not certain what is causing the error though. You might try upgrading to > > the current version, 9.01 was released last week. What happens if you simply > > invoke Ghostscript with no parameters ? > An empty window is displayed and a command prompt is created on the console. Well that tells us that Ghostscript is at least running, so its built and installed correctly. You can get rid of the running instance by typing quit at the GS> prompt. > I'll request packaging 9.01 in Gentoo, with less patches hopefully. I'll test > again when that's done. I'm not certain this will resolve your problem. Your PDF file works here on 9.0 and 9.01, but it doesn't appear to be the file which you are sending to Ghostscript. While its possible that you have found a bug which has been fixed over the last 6 months, its equally likely that 9.01 will have the same problem, and you'll be back in this situation again. It really is worthwhile trying to get the PostScript file from CUPS and letting us take a look at it. Created attachment 7243 [details]
Job data captured from /var/spool/cups
Hmm, interesting, it really is a PDF file (not a PostScript file as implied by the .ps suffix). The file works for me on both Ghostscript 9.0 and 9.01. Its possible that there is some command line switch which is causing the problem, in which case I would not expect it to be resolved by moving to 9.01. But, without knowing how CUPS is invoking Ghostscript, there isn't really a lot I can offer in the way of advice. I'm going to close this as 'WORKSFORME', feel free to reopen it if you can find a Ghostscript command line which shows the problem. FWIW, it also works as expected with the gs 8.71 default install on Ubuntu 10.10. (In reply to comment #8) > But, without knowing how CUPS is invoking Ghostscript, there isn't really a lot > I can offer in the way of advice. I have "LogLevel debug2" enabled in cupsd.conf, but the log does not contain anything about the invocation of ghostscript. I thought from previous debugging sessions that (a) CUPS would always push its input through GS, and (b) that the literal output of that command would appear in the logs. Seems I'm remembering wrongly. I can however print to PostScript first and then print that using "lp <file>", so it's a WORKSFORME, too. P.S: The last attachment might be any format, I just assumed it is PS and named it this way. From the comments I can see the problem still presists. I have done some investigations with CUPS filter already (I have a different problem), so I can help in this area. Over at the Gentoo bugzilla [1] someone else reported having the same problem depending on whether he uses GS 9.x or 8.x: --- I have an HP 1018 LaserJet Printer with =app-text/ghostscript-gpl-9.00-r1 and =net-print/hplip-3.11.1-r2. I am running Gentoo on ~amd64. I tried printing a newegg order invoice today. The newegg logo and hyperlink text printed, but all of the plaintext (bold or otherwise) was missing. I downgraded to app-text/ghostscript-gpl-8.71-r6 and it printed without a problem. --- For me it was quite the same: The smiley and the box around the header printed fine, but all regular text was missing. Oldřich: What is probably needed now is figuring out how CUPS calls GS for printing this file, so it can be reproduced without going through CUPS and KDE-Printing. [1] http://bugs.gentoo.org/show_bug.cgi?id=341207#c26 Richard, the reporter of the Gentoo bug wants to get this passed on to you: --- I can reproduce this on my system very easily by trying to print newegg.com invoices. I suspect that the issue has something to do with the specific font that newegg uses for their invoices, but I have not done extensive testing to be certain. I was going through a backlog of rebate applications yesterday, so I had to print all sorts of things. I recall seeing graphical corruption (white spots) in a barcode that was printed on one of the rebate forms. I wasted a dozen pieces of paper trying to print things until I thought of trying to go back to the older version of ghostscript-gpl. None of these issues appear with it. --- I already asked him for a testcase. Created attachment 7263 [details]
Shell script to catch arguments and environment
Use the attached script to capture the ghostscript arguments and generated output. It cannot capture input, though.
Everything should be done as root (so a BIG warning here). Go to the place, where you have ghostscript executable. On my system the executable is at /usr/bin/gs. Rename it to have ".bin" at the end (`cd /usr/bin; mv gs gs.bin`), the resulting full path is /usr/bin/gs.bin. Take the attached file and save it to the same place as the original ghostscript (/usr/bin/gs), make it executable (`chmod ugo+x /usr/bin/gs`) and try to print. You should have a new file /tmp/cups-gs-<date>-<time>.<nanosecond>.log with environment and command line arguments, also /tmp/cups-pipe/gs-<date>-<time>.<nanosecond>.log with output.
The attached script can be used also in /usr/libexec/cups/filters to capture output of other filters. Just store it in /usr/libexec/cups/filters, rename the filter to "<name>.bin", create a symbolic link that points to the attached script and give it a name "<name>". I used it with pstops and pstoraster, but for pdf you might need to wrap pdftops and/or pdftoraster.
|