[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#990210: fixed in cups-pdf 3.0.1-12



Andre, could you attach your PostScript file, once the original and also the one you get after pre-processing when using "GSCall echo %s %s %s;
cp %s /tmp"? Thanks.


----------

On 28/09/2021 14:20, Andre Heider wrote:

Indeed, still only getting an empty pdf on that file too.

That's another problem than the empty pdf files I was seeing before.
That issue prevented cups-pdf to produce non-empty files at all, no
matter what the input was. Even the cups test page failed.

Now it seems specific to this file. My pdf viewer atril claims the
original ps has 422 pages. If I fix it up with `ps2ps all.ps all2.ps`
the new file reports 993 pages, atril even shows another first page...

And printing that with `lp -dPDF all2.ps` works just fine.

The error handling from cups-pdf sure is funky here.

Cheers,
Andre

----------

On 29/09/2021 09:11, Andre Heider wrote:

Did some more digging since I reused this bug because I thought it's the
same issue...

If you set the GSCall config to the default value but append
"1>/tmp/gs.out 2>&1" you can see an error in that file:

--- 8< ---
Error: /nocurrentpoint in --currentpoint--
Operand stack:
   (--)   80
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--
  --nostringval--   false   1   %stopped_push   1990   1   3
%oparray_pop   1989   1   3   %oparray_pop   1977   1   3   %oparray_pop
  1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop
.runexec2   --nostringval--   --nostringval--   --nostringval--   2
%stopped_push   --nostringval--   --nostringval--
Dictionary stack:
   --dict:736/1123(ro)(G)--   --dict:0/20(G)--   --dict:89/200(L)--
--dict:63/140(L)--
Current allocation mode is local
Current file position is 10444
GPL Ghostscript 9.54.0: Unrecoverable error, exit code 1
--- 8< ---

The reason it fails with lp but succeeds with the manual gs cmdline is
that cups preprocesses the input file. If you use "GSCall echo %s %s %s;
cp %s /tmp" it'll copy the actual file used for cups-pdf to /tmp, for
which you then get the same error if you manually use the gs cmdline on it.

I don't know enough about the printing stack/postscript to tell if
that's fixable, but it all sounds like a corrupt ps file to me.


Reply to: