Author Topic: Cups won't print PDFs  (Read 19517 times)

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Cups won't print PDFs
« on: February 17, 2014, 06:14:45 pm »
Printing from most applications works.
When I try to print from Lucide or Qpdfview I get errors. See below for excerpts from the error log.
GS8.71, Gutenprint 5.2.9, Cups 1.4.8 installed freshly from ZIP files. Don't know if it is related, but I can't install using wpi, Warpin gives an error 'Invalid package index "5" specified with REQUIRED attribute' when trying to extract cups-base-1_4_8_3.wpi, although all required packages are in the same directory.


Printing from Qpdfview:
cups/lib/cups/filter/pstoraster failed

D [17/Feb/2014:17:45:53 -0100] [Job 4] Error: /syntaxerror in (bin obj seq, type=128, elements=1, size=56322, non-zero unused field)
D [17/Feb/2014:17:45:53 -0100] [Job 4] Operand stack:
D [17/Feb/2014:17:45:53 -0100] [Job 4]
D [17/Feb/2014:17:45:53 -0100] [Job 4] Execution stack:
D [17/Feb/2014:17:45:53 -0100] [Job 4] %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1846   1   3   %oparray_pop   1845   1   3   %oparray_pop   1829   1   3   %oparray_pop   1723   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
D [17/Feb/2014:17:45:53 -0100] [Job 4] Dictionary stack:
D [17/Feb/2014:17:45:53 -0100] [Job 4] --dict:1157/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--   --dict:73/75(L)--
D [17/Feb/2014:17:45:53 -0100] [Job 4] Current allocation mode is local
D [17/Feb/2014:17:45:53 -0100] [Job 4] Last OS error: No such file or directory
D [17/Feb/2014:17:45:53 -0100] [Job 4] GPL Ghostscript 8.71: Unrecoverable error, exit code 1


Printing from Lucide:
"No %%BoundingBox: comment in header!"

D [17/Feb/2014:17:52:45 -0100] [Job 5] Error: /invalidfont in /findfont
D [17/Feb/2014:17:52:45 -0100] [Job 5] Operand stack:
D [17/Feb/2014:17:52:45 -0100] [Job 5] F70_0   1   1   --nostringval--   Helvetica-Oblique
D [17/Feb/2014:17:52:45 -0100] [Job 5] Execution stack:
D [17/Feb/2014:17:52:45 -0100] [Job 5] %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1846   1   3   %oparray_pop   1845   1   3   %oparray_pop   1829   1   3   %oparray_pop   1723   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   1804   5   4   %oparray_pop
D [17/Feb/2014:17:52:45 -0100] [Job 5] Dictionary stack:
D [17/Feb/2014:17:52:45 -0100] [Job 5] --dict:1157/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--   --dict:67/75(L)--
D [17/Feb/2014:17:52:45 -0100] [Job 5] Current allocation mode is local
D [17/Feb/2014:17:52:45 -0100] [Job 5] Last OS error: No such file or directory
D [17/Feb/2014:17:52:45 -0100] [Job 5] GPL Ghostscript 8.71: Unrecoverable error, exit code 1

Michaelhz

  • Guest
Re: Cups won't print PDFs
« Reply #1 on: February 17, 2014, 08:33:59 pm »
Hm... know problem to me also with some special pfd's. Try bitmap-printing with lucide.

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #2 on: February 17, 2014, 09:28:32 pm »
Here it happens with ALL pdf's I try to print. Stange thing is, it used to work.. Printing as bitmap does work, although in grayscale instead of colour and the printjob doesn't finish in cups even when all has been printed properly.. Still would like to know if it's fixable...
« Last Edit: February 17, 2014, 09:33:49 pm by guzzi »

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #3 on: February 17, 2014, 11:23:40 pm »
  Did you update your pstoraster file to point at Ghostscript? Also, you need to make sure C:\cups\sbin is on your libpath in order for printing from any QT based app to work. Did you get all required apps from the same location (ftp://ftp.netlabs.org/pub/ecups/install)? Make sure there is only one version of cups.dll on your system. You also might want to give Ghostscript 9.10 a try... it has been working well with CUPS here... Based on the Lucide errors you show, maybe you are missing a required font? (not sure how to determine that though...).

  Just a few thoughts off the top of my head...

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #4 on: February 17, 2014, 11:47:00 pm »
Pstoraster points at the right location. cups\sbin has never been in my libpath. Adding it makes no difference. I didn't use the warpin packages, as I mentioned in the original post. The locations of the zip files in the wiki are no longer valid, they are now partly on sourceforge and partly on paul's site. Will give GS9.1 a try but since cups has been working there might be something else broken. I have the same problem on 2 ecs installs though, 2.1 and 2.2b so that would  indicate a problem with cups.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #5 on: February 18, 2014, 02:54:19 am »
IIRC - at some point I released an updated \cups\bin\pdftops.exe - will confirm more details tonight....

Alex Taylor

  • Sr. Member
  • ****
  • Posts: 387
  • Karma: +5/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #6 on: February 18, 2014, 03:26:09 pm »
According to the notes I have, the updated file is dated 2013-5-18 - originally from http://smedley.id.au/tmp/pdftops.zip although that link is long since defunct.

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #7 on: February 18, 2014, 05:49:37 pm »
The link was still valid. Replaced pdftops.exe. still the same result:

D [18/Feb/2014:17:48:04 -0100] [Job 9] Error: /invalidfont in /findfont
D [18/Feb/2014:17:48:04 -0100] [Job 9] Operand stack:
D [18/Feb/2014:17:48:04 -0100] [Job 9] F70_0   1   1   --nostringval--   Helvetica-Oblique
D [18/Feb/2014:17:48:04 -0100] [Job 9] Execution stack:
D [18/Feb/2014:17:48:04 -0100] [Job 9] %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1846   1   3   %oparray_pop   1845   1   3   %oparray_pop   1829   1   3   %oparray_pop   1723   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   1804   5   4   %oparray_pop
D [18/Feb/2014:17:48:04 -0100] [Job 9] Dictionary stack:
D [18/Feb/2014:17:48:04 -0100] [Job 9] --dict:1157/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--   --dict:73/75(L)--
D [18/Feb/2014:17:48:04 -0100] [Job 9] Current allocation mode is local
D [18/Feb/2014:17:48:04 -0100] [Job 9] Last OS error: No such file or directory
D [18/Feb/2014:17:48:04 -0100] [Job 9] GPL Ghostscript 8.71: Unrecoverable error, exit code 1

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #8 on: February 21, 2014, 01:55:28 am »
I installed GS 9.10. That solved the problem printing PDF's. Some issues remain
I have 'tray' set as paper source. All applications use tray, except Qpdfview, which will use the rear feed regardless of settings. That might be a bug in Qpdfview.
Qpdfview and Lucice print in colour, all other apps in grayscale. I have tried several settings for colour and ink (yes, I adjust them in both the cups web interface and the cups PM driver), to no avail. I don't know the inner workings of it all, but I suspect that printing PDFs from Lucide and Qpdfview bypass some of the cups PM functionality becauae of the postscript nature. That would mean the ppd I imported is not right.
I have 2 PPD files...one in ecs\install\prndrv\ppd_e and one in ecs\install\prndrv\ppd. The latter is about twice the size and 3 minutes older.
Should they both be there and be different in size? A quick comparison tells me one looks truncated.
Next step will be deling printers and ppd's and reinstalling both.

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #9 on: February 21, 2014, 02:37:52 am »
  Check the contents of the 2 files and see if either ends with a line something like this:

*% End of hp-deskjet_990c.ppd, 22550 bytes.

  If not, the file is probably truncated. I seem to remember an issue with an earlier version of CUPS that would truncate ppd's, but it is a little hazy now...

  Do you have a ppd file in \cups\etc\cups\ppd? That is the one CUPS uses. Check its contents to see if it might be truncated too.... If it is, and one of the other ones you mention is not, try copying the 'good' (not truncated) one into \cups\etc\cups\ppd (save the old ones!).

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #10 on: February 21, 2014, 03:53:42 am »
There is one in  \cups\etc\cups\ppd too with a different size again and it also doesn end with a % end line, so it seems all drivers are corrupt. Question is now, how do I get a proper one? I used instpdr to extract this one.

Silvan Scherrer

  • Full Member
  • ***
  • Posts: 200
  • Karma: +1/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #11 on: February 21, 2014, 11:13:21 am »
I have 'tray' set as paper source. All applications use tray, except Qpdfview, which will use the rear feed regardless of settings. That might be a bug in Qpdfview.
It might be a Qpdfview problem, but it could also be a cups problem. As Qpdfview talks direct to cups. With all Qt apps the PM driver is never used.

regards
Silvan
kind regards
Silvan
CTO bww bitwise works GmbH

Please help us with donations, so we can further work on OS/2 based projects. Our Shop is at https://www.bitwiseworks.com/shop/index.php

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #12 on: February 21, 2014, 01:51:58 pm »
 What type of printer are you trying to print to? How is it attached?

 If you are certain you have the latest updates (which corrects the truncation issue), you could just try deleting, then re-installing your printer in the CUPS web interface. Assuming that works (print test page), then take the ppd in \cups\etc\cups\ppd and import it into the OS/2 postscript printer and install a new printer object (you could use Alex's CUPSWIZ - will do it automatically).

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #13 on: February 21, 2014, 03:29:04 pm »
I deleted and recreated the printer and almost everything works now, except for qt applications. They still use the wrong tray. I see this in the cups log:

D [21/Feb/2014:15:19:02 -0100] [Job 38] 0
D [21/Feb/2014:15:19:02 -0100] [Job 38] /%MediaSource

D [21/Feb/2014:15:19:03 -0100] [Job 38] Gutenprint:         (InputSlot) (2) (String) [AutoSwitch]

In default settings I have cassete defined. When I print via the PM driver the cassette will be used. So either QT or CUPS is not setting the paper input properly.

Alex Taylor

  • Sr. Member
  • ****
  • Posts: 387
  • Karma: +5/-0
    • View Profile
Re: Cups won't print PDFs
« Reply #14 on: February 21, 2014, 05:28:15 pm »
Dumb question maybe, but you did verify the printer settings in the Cups web GUI (and not in the OS/2 printer object), right?