OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Setup & Installation => Topic started by: guzzi on February 17, 2014, 06:14:45 pm

Title: Cups won't print PDFs
Post by: guzzi 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
Title: Re: Cups won't print PDFs
Post by: Michaelhz on February 17, 2014, 08:33:59 pm
Hm... know problem to me also with some special pfd's. Try bitmap-printing with lucide.
Title: Re: Cups won't print PDFs
Post by: guzzi 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...
Title: Re: Cups won't print PDFs
Post by: David McKenna 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...
Title: Re: Cups won't print PDFs
Post by: guzzi 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.
Title: Re: Cups won't print PDFs
Post by: Paul Smedley 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....
Title: Re: Cups won't print PDFs
Post by: Alex Taylor 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.
Title: Re: Cups won't print PDFs
Post by: guzzi 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
Title: Re: Cups won't print PDFs
Post by: guzzi 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.
Title: Re: Cups won't print PDFs
Post by: David McKenna 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!).
Title: Re: Cups won't print PDFs
Post by: guzzi 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.
Title: Re: Cups won't print PDFs
Post by: Silvan Scherrer 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
Title: Re: Cups won't print PDFs
Post by: David McKenna 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).
Title: Re: Cups won't print PDFs
Post by: guzzi 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.
Title: Re: Cups won't print PDFs
Post by: Alex Taylor 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?
Title: Re: Cups won't print PDFs
Post by: Doug Bissett on February 21, 2014, 07:26:41 pm
I have, sort of, been following this. All I can say, is that I have no trouble printing PDFs, using QPDFView (I scrapped Lucide when QPDFView became available).

From the first post:
Quote
Warpin gives an error 'Invalid package index "5"

This is something that is wrong in the WarpIn installer. However, it can be worked around, by installing all of the other WarpIn packages first, then install the cups-base-1_4_8_3.wpi package. There seems to be something in the full WarpIn package, that has fixed the PDF problem (probably pdftops), that is not in the ZIP files.
Title: Re: Cups won't print PDFs
Post by: guzzi on February 22, 2014, 12:50:15 am
Dumb question maybe, but you did verify the printer settings in the Cups web GUI (and not in the OS/2 printer object), right?

Yes, of course.



From the first post:
Quote
Warpin gives an error 'Invalid package index "5"

This is something that is wrong in the WarpIn installer. However, it can be worked around, by installing all of the other WarpIn packages first, then install the cups-base-1_4_8_3.wpi package. There seems to be something in the full WarpIn package, that has fixed the PDF problem (probably pdftops), that is not in the ZIP files.

I installed the updated pdftops Alex mentioned.
Title: Re: Cups won't print PDFs
Post by: David McKenna on February 22, 2014, 02:24:40 am
 Are there any print properties that need to be changed in the print dialog of the app itself? I have no trouble printing with qPDFView...
Title: Re: Cups won't print PDFs
Post by: Alex Taylor on February 22, 2014, 01:48:10 pm
Quote
Warpin gives an error 'Invalid package index "5"

This is something that is wrong in the WarpIn installer. However, it can be worked around, by installing all of the other WarpIn packages first, then install the cups-base-1_4_8_3.wpi package.

That error is caused by missing libusbdll10.wpi - not a problem in the installer per se but in the README which wasn't updated to mention that this file is now used.
Title: Re: Cups won't print PDFs
Post by: guzzi on February 23, 2014, 01:43:12 am
Are there any print properties that need to be changed in the print dialog of the app itself? I have no trouble printing with qPDFView...

Yes, one can set the tray selection in the properties >advanced. It's set to cassette.I've downloaded libusbdll10.wpi and will try to reinstall using the wpi packages and see if that gives a different result.