[cups.development] [RFE] STR #3866: CUPS banners: support job information also in "Header" and "Footer"
Joachim Reichelt
j_reichelt at web.de
Mon Jun 20 08:18:16 PDT 2011
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Currently CUPS banner pages do not support
to use the job information values (for the "Show" keyword)
also in the text for the "Header" and "Footer".
Something like
-------------------------------------------------------------
Header job-name for job-originating-user-name
-------------------------------------------------------------
would be nice to have so that the admin could specify
to get what is most important in his particular case
printed topmost on the banner pages.
This is an import feature for using cups in commercial environment, as
there are several bunches of printouts on big printing machines.
This would not break any existing feature and are about 4 lines of code to
add to bannertops.c, e.g.
1003
1004 if (banner->header)
1005 {
1006 printf("%.1f %.1f moveto", x, print_height - 2 * fontsize);
1007 if( strcasecmp("job-originating-user-name", banner->header) ) {
1008 psTextUTF8(fonts, 2 * fontsize, PS_BOLD, PS_CENTER,
banner->header);
1009 } else {
1010 psTextUTF8(fonts, 2 * fontsize, PS_BOLD, PS_RIGHT,
1011 _cupsLangString(language, _("Printed For: ")));
1012 psTextUTF8(fonts, 2 * fontsize, PS_BOLD, PS_LEFT,
username);
1013 }
1014 }
1015
1016 if (banner->footer)
1017 {
1018 printf("%.1f %.1f moveto", x, fontsize);
1019 if( strcasecmp("job-originating-user-name", banner->footer ) )
{
1020 psTextUTF8(fonts, 2 * fontsize, PS_BOLD, PS_CENTER,
banner->footer);
1021 } else {
1022 psTextUTF8(fonts, 2 * fontsize, PS_BOLD, PS_RIGHT,
1023 _cupsLangString(language, _("Printed For: ")));
1024 psTextUTF8(fonts, 2 * fontsize, PS_BOLD, PS_LEFT,
username);
1025 }
1026 }
Link: http://www.cups.org/str.php?L3866
Version: -feature
More information about the cups
mailing list