[cups.bugs] [LOW] STR #2643: PDF is printed incorrectly with 'number-up' and 'page-ranges'
drakamakafon at mail.ru
drakamakafon at mail.ru
Fri Dec 28 22:24:36 PST 2007
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
PDF is printed incorrectly when 'number-up' and 'page-ranges' options are
specified simultaneously.
Tested OS:
1.1.23 (SuSE 9.3, package name: cups-1.1.23-7.1)
1.1.23 (Mandriva 2006, package name: cups-1.1.23-17mdk)
1.2.3 (Mandriva 2007, package name: cups-1.2.3-5mdv2007.0)
1.2.4 (Ubuntu 6.10, package name: 1.2.4-2ubuntu3)
After investigation I found that 'pstops' from different version of cups
produces different output when 'number-up' and 'page-ranges' are specified
simultaneously.
test7.ps - postscript file (7 pages)
> /usr/lib/cups/filter/pstops 12345 user title 1 "-o page-ranges=1-3 -o
number-up=2" test.ps > pstops-out
1.1.23 (SuSE 9.3, Mandriva 2006)
######### #########
#1 # #3 #
# # # #
######### #########
#2 # #blank #
# # # #
######### #########
Looks like operations are performed in the following order:
1) Select pages according to 'page-ranges' value
2) Layout selected pages according to 'number-up' value
1.2.3 (Mandriva 2007) 1.2.4 (Ubuntu 6.10)
######### ######### #########
#1 # #3 # #5 #
# # # # # #
######### ######### #########
#2 # #4 # #6 #
# # # # # #
######### ######### #########
Looks like the same operations are performed in reverse order, i.e:
1) Layout ALL pages according to 'number-up' value
2) Select pages from new page sequence according to 'page-ranges' value
The same behaviour in later versions (v1.3 Fedora 8). Is it the feature of
newer 'pstops' or bug?.
ASAIK 'pdftops' doesn't take into account 'number-up' option so after
http://cups.org/str.php?L273 is resolved the 'pdftops|pstops' pipe may
produce strange output.
Example:
> lpr "-o page-ranges=1,3-4,6 -o number-up=2" test.pdf
1. 'pdftops' output:
######### ######### ######### ######### ######### ######### #########
# # # # # # # # # # # # # #
# # # # # # # # # # # # # #
# # # # # # # # # # # # # #
# # # # # # # # # # # # # #
#1 # #blank # #3 # #4 # #blank # #6 # #blank #
######### ######### ######### ######### ######### ######### #########
2. 'pstops' output:
2.1. Layout ALL pages according to 'number-up' value
######### ######### ######### #########
#1 # #3 # #blank # #blank #
# # # # # # # #
######### ######### ######### #########
#blank # #4 # #6 # #blank #
# # # # # # # #
######### ######### ######### #########
2.2. Select pages from new page sequence according to 'page-ranges' value
(1,3-4,6)
######### ######### #########
#1 # #blank # #blank #
# # # # # #
######### ######### #########
#blank # #6 # #blank #
# # # # # #
######### ######### #########
that are 1,3-4 from the previous step (page 6 became out of page range
after n-up).
So totally 3 pages are printed (3rd page is empty). It looks pretty
strange in respect that page-ranges=1,3-4,6 was requested. Either 'pstops'
should process options in the v1.1 order or 'pdftops' should understand
'number-up' option.
Link: http://www.cups.org/str.php?L2643
Version: 1.2.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test7.ps
Type: application/octet-stream
Size: 666 bytes
Desc: not available
URL: <https://lists.cups.org/pipermail/cups/attachments/20071228/6e71977b/attachment.obj>
More information about the cups
mailing list