Bug 244979
Summary: | add page-ranges and accounting to textonly filter | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Opher Shachar <ophers> | ||||||
Component: | cups | Assignee: | Tim Waugh <twaugh> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 6 | Keywords: | Reopened | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 1.2.12-1.fc8 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2007-07-16 11:45:35 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 235704 | ||||||||
Attachments: |
|
Description
Opher Shachar
2007-06-20 11:55:26 UTC
Created attachment 157451 [details]
CUPS textonly filter with page-ranges and accounting
Hi Tim, First as to the appending of the FF to the last printed page, I concur with you. My original rational was that without this the first page of copy#2 would follow the last page of copy#1. Next, when 'unset PR' is used page accounting seems to go wrong. The man page for CUPS filter has this to say: (output to stderr) PAGE: page-number #-copies PAGE: #-pages total Adds an entry to the current PageLog. The first form adds #-copies to the job- media-sheets-completed attribute. The second form sets the job-media-sheets- completed attribute to #-pages. ...but when I was testing the _second form_ did not do as expected. So hence PR=1-999999. For my needs accurate page accounting was indispensable. Please feel free to modify the script as you see fit. Regards, Opher Shachar. Hello again. Tim, you managed to confuse me :) This code: if (( pagenum == pl )); then echo -n "${REPLY}" >>"$TMPFILE2" # If EOF then page has no final FF [[ ! "$EOF" ]] && echo -ne '\f' >>"$TMPFILE2" echo "PAGE: $pagenum $COPIES" >&2 fi does *not* insert unwarranted FF. The 'read' command strips the delimiter (FF) form $REPLY so this code outputs it back just if it was present in the first place. If we have not reached EOF then we _must_ have encountered FF witch got stripped... Regards, Opher Shachar. (In reply to comment #3) > The 'read' command strips the delimiter (FF) > form $REPLY so this code outputs it back just if it was present in the first > place. Ah, now I understand! Thanks for clarifying this. Good news! Outputting Total page count does work - it was a documentation error (see STR #2427). Also modified the loop to be more eficiet by setting the FF variable: FF=$(echo -ne '\f') So I've updated my script and uploading it. Opher Shachar. Created attachment 158730 [details]
CUPS textonly filter with page-ranges and accounting
Thanks. Fixed in CVS. |