Bug 1008166 - Printing to a range of a PDF file with acroread to a cups printer prints only the first page of document
Printing to a range of a PDF file with acroread to a cups printer prints only...
Product: Fedora
Classification: Fedora
Component: cups-filters (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
: 1011965 (view as bug list)
Depends On:
Blocks: 1032117
  Show dependency treegraph
Reported: 2013-09-15 07:51 EDT by Joachim Backes
Modified: 2013-12-07 02:04 EST (History)
4 users (show)

See Also:
Fixed In Version: cups-filters-1.0.41-4.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1032117 (view as bug list)
Last Closed: 2013-11-23 22:54:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
troubleshoot.txt (169.62 KB, text/plain)
2013-09-16 09:27 EDT, Joachim Backes
no flags Details
troubleshoot.txt (335.15 KB, text/plain)
2013-11-18 09:41 EST, Joachim Backes
no flags Details
d-file from /var/spool/cups (303.91 KB, text/plain)
2013-11-18 10:23 EST, Joachim Backes
no flags Details

  None (edit)
Description Joachim Backes 2013-09-15 07:51:07 EDT
Description of problem:
If opening some PDF file with acroread and printing a page range (previously selected by the acroread printting dialog) will print only the first page of the range. I don't think it is a acroread issue :-)

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. Open a PDF file with acroread
2.Print a page range to a cups printer

Actual results:
 only the first page of the range is printed

Expected results:

Additional info:

0. The same effect if I try to print the whole file
1. If printing the page range to a cups-pdf printer, the range is printed completely

2. printing the same range with "lp -d <printer> -P <page range> <PDF file>" has no flaws!!
Comment 1 Tim Waugh 2013-09-16 08:27:48 EDT
Please run the printing troubleshooter and, when it asks you to print something, do so using acroread (and select a page range).

Comment 2 Joachim Backes 2013-09-16 09:27:20 EDT
Created attachment 798284 [details]

The printer troubleshooting system says that it can't find any useful information, but it generated troubleshoot.txt which I attached!
Comment 3 Joachim Backes 2013-09-16 09:33:06 EDT
Running no now again the printing troubleshooter, it says:

Status messages:

There are status mesages assiciated with this queue.
The printer's state message is: 'waiting for printer to finish'


$ lpq
ml-1660 is ready
no entries
Comment 4 Tim Waugh 2013-09-25 09:22:29 EDT
*** Bug 1011965 has been marked as a duplicate of this bug. ***
Comment 5 Joachim Backes 2013-09-26 00:54:30 EDT
Still same problems with cups-1.6.4-1.fc19.x86_64
Comment 6 Joachim Backes 2013-10-11 22:49:41 EDT
still same problems with cups-1.6.4-2.fc19.x86_64
Comment 7 Joachim Backes 2013-10-11 22:56:37 EDT
Seeing the same in F20 with cups-1.7-0.26.rc1.fc20.x86_64
Comment 8 Tim Waugh 2013-11-18 08:26:58 EST
Could you please re-test? This may have been related to bug #1019261. Please note which version of cups-filters you have.
Comment 9 Joachim Backes 2013-11-18 08:49:21 EST
(In reply to Tim Waugh from comment #8)
> Could you please re-test? This may have been related to bug #1019261. Please
> note which version of cups-filters you have.

Still same problems (only first page of a page range is printed) with AdobeReader_enu-9.5.5-1.i486 and the following cups parts:


But the problem now disappears if using evince-3.10.2-1.fc20.x86_64 together with the above cups parts: page ranges are printed well and completely:-)

Comment 10 Tim Waugh 2013-11-18 08:58:40 EST
OK. It's looking like it might be an Adobe bug, as the job in comment #2 does not have the "page-ranges" attribute set. That means Adobe is munging the job itself rather than letting CUPS do it.

To be sure about it, I think we need to capture the actual data that Adobe Reader sends. To do that, run this command as root:

cupsctl PreserveJobFiles=1

Then please run the troubleshooter again and attach the resulting troubleshoot.txt, as well as the /var/spool/cups/d* file you should now have (which is the print job that Adobe Reader submitted).
Comment 11 Joachim Backes 2013-11-18 09:41:52 EST
Created attachment 825693 [details]

1. Attached troubleshoot.txt
2. Weird: /var/spool/cups contains no d**** file, only c**** file.
Comment 12 Tim Waugh 2013-11-18 09:55:11 EST
Oh, there's should have been a file called /var/spool/cups/d00193-001 (193 is the job ID).

Maybe the cupsctl command should be this instead:

cupsctl PreserveJobFiles=Yes

Could you try that?
Comment 13 Joachim Backes 2013-11-18 10:23:06 EST
Created attachment 825717 [details]
d-file from /var/spool/cups

Seems "cupsctl PreserveJobFiles=1" was the culprit. Exchanging "1" by "Yes" did it!
Comment 14 Tim Waugh 2013-11-18 12:56:47 EST
So that job (194) has two pages in it. But you only got one out from the printer?

pstops thinks there are two pages. gstoraster thinks there are two pages. I'm starting to think splix is to blame:

'D [16/Sep/2013:15:23:04 +0200] [Job 465] SpliX Page 1 (4779\xc3\x976767 on 4960\xc3\x977017) has been successfully loaded into memory',
'D [16/Sep/2013:15:23:04 +0200] [Job 465] SpliX No more pages',

There's something else wrong too. We should be going via pstotiff but for some reason we are, even with cups-filters-1.0.41-3.fc20 which was meant to contain a fix for this (bug #1019261):

D [18/Nov/2013:15:35:58 +0100] [Job 193] pstops (application/vnd.adobe-reader-postscript to application/vnd.cups-postscript, cost 66)
D [18/Nov/2013:15:35:58 +0100] [Job 193] pstotiff (application/vnd.cups-postscript to image/tiff, cost 80)
D [18/Nov/2013:15:35:58 +0100] [Job 193] imagetoraster (image/tiff to application/vnd.cups-raster, cost 100)
D [18/Nov/2013:15:35:58 +0100] [Job 193] rastertoqpdl (application/vnd.cups-raster to printer/ml-1660, cost 0)

Changing component to cups-filters to focus on this second issue. There may be a splix issue as well.
Comment 15 Joachim Backes 2013-11-18 14:19:44 EST
(In reply to Tim Waugh from comment #14)
> So that job (194) has two pages in it. But you only got one out from the
> printer?

Right! But why the range is printed well with evince, but not with acroread?
Comment 16 Tim Waugh 2013-11-19 06:43:10 EST
I expect it's to do with the type of output they produce. evince will produce output identified as application/postscript but acroread's output is identified as application/vnd.adobe-reader-postscript due to this in cupsfilters.types:

# CUPS file detection rule for PostScript which is generated by the Adobe
# Reader. We distinguish PostScript from the Adobe reader here so that we
# can override pstopdf and the PDF workflow for these PostScript files as the
# conversion of them to PDF does not work if the original PDF file was
# encrypted.

application/vnd.adobe-reader-postscript priority(150) contains(0,4096,"%%Creator: Adobe Acrobat") + \
                                (ai eps ps string(0,%!) string(0,<04>%!) \
                                 contains(0,128,<1B>%-12345X) + \
                                 (contains(0,4096,"LANGUAGE=POSTSCRIPT") \
                                  contains(0,4096,"LANGUAGE = Postscript") \
                                  contains(0,4096,"LANGUAGE = PostScript") \
                                  contains(0,4096,"LANGUAGE = POSTSCRIPT") \
                                  (contains(0,4096,<0a>%!) + \
                                   !contains(0,4096,"ENTER LANGUAGE"))))
Comment 17 Tim Waugh 2013-11-19 08:05:04 EST
I'm building cups-filters-1.0.41-4.fc20 which fixes the filter costs to avoid using pstotiff|imagetoraster. I expect that will fix the problem.
Comment 18 Joachim Backes 2013-11-19 08:44:33 EST

I updated to cups-filters-1.0.41-4.fc20, and this fixed my acroread printing problem: ranges are now printed well.

Thank you very much.
Comment 19 Fedora Update System 2013-11-19 10:33:45 EST
cups-filters-1.0.41-4.fc20 has been submitted as an update for Fedora 20.
Comment 20 Fedora Update System 2013-11-19 10:34:18 EST
cups-filters-1.0.41-4.fc19 has been submitted as an update for Fedora 19.
Comment 21 Fedora Update System 2013-11-19 16:50:03 EST
Package cups-filters-1.0.41-4.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cups-filters-1.0.41-4.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 22 Fedora Update System 2013-11-23 22:54:39 EST
cups-filters-1.0.41-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Fedora Update System 2013-12-07 02:04:44 EST
cups-filters-1.0.41-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.