Toon posts:

[printing] separator page met computername

Pagina: 1
Acties:

Verwijderd

Topicstarter
Ik zou graag (voor een netwerk met maar 2 type users) een separator page willen hebben waar de computernaam waar de print vandaan komt op komt te staan (als "van wie de print is).
Ik heb al gezocht, een bestandje op de harde schijf gemaakt waarin de computernaam staat (helaas pakt ie alleen deze van de server)...

  • DukeBox
  • Registratie: April 2000
  • Niet online
Iets meer info kan geen kwaad.. printer server ? merk/type ? netwerk/usb/paralel ?
Voor een lpd server kan je er de code ^[{ARG-xxxxx}&$lt6 achter plaatsen waarbij xxxxx een ysteem variable kan zijn. In jouw geval bijv. %COMPUTERNAME%.

Verwijderd

Topicstarter
dell 3100 CN; netwerk; windows server 2003...

Dit doet ie alvast (standaard windows):

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
@
@Lerrordict begin /handleerror { $error begin newerror { /newerror false
@Ldef showpage 72 72 scale /x .25 def /y 10 def /Helvetica findfont .2
@Lscalefont setfont x y moveto (PostScript Error Handler)
@Lshow /y y .2 sub .2 sub def x y moveto
@L(Offending Command = ) show /command load { dup type /stringtype ne { (
@Lmax err string ) cvs } if show } exec /y y .2 sub def x y moveto (Error
@L= ) show errorname { dup type dup ( max err string ) cvs show ( : ) show
@L/stringtype ne { ( max err string ) cvs } if show } exec /y y .2 sub def
@Lx y moveto (Stack =) show ostack { /y y .2 sub def x 1 add y moveto dup
@Ltype /stringtype ne { ( max err string ) cvs } if show } forall showpage
@L} if end } def end
@L% Pull off the job specific values:
@L%----------------------------------
@L/name (@FC:\\computername@L) def
@L/jobid(@I@L) def
@L/date (@D@L) def
@L/time (@T@L) def
@L% Get the page limits
@L%--------------------
@Lnewpath clippath closepath pathbbox
@L/ymax exch def
@L/xmax exch def
@L/ymin exch def
@L/xmin exch def
@L/PrintWidth xmax xmin sub def
@L/PrintHeight ymax ymin sub def
@L% Define some handy procedures and values
@L%----------------------------------------
@L/inch {72 mul} def
@L/White 1 def
@L/Black 0 def
@L/Gray .9 def
@L/CenterString {
@L    /str exch def /width exch def
@L    width str stringwidth pop sub 2 div 0 rmoveto
@L    str
@L} def
@L% Print the printers logo (if any)
@L%---------------------------------
@L/SysPrint where
@L{
@L    pop
@L    SysPrint
@L}{
@L    /Times-Roman findfont .5 72 mul scalefont setfont
@L    PrintWidth 2 div 5 72 mul moveto
@L    (Funplaza Pagina Scheiding) dup stringwidth pop 2 div neg 0 rmoveto show
@L}ifelse
@L% Set some standard parameters
@L%-----------------------------
@L100 0 {dup mul exch dup mul add 1 exch sub} setscreen
@L2 setlinewidth 2 setmiterlimit
@L% Clear and outline the title area
@L%---------------------------------
@Lnewpath
@Lxmin ymax moveto
@Lxmax ymax lineto
@Lxmax ymax 1.5 inch sub lineto
@Lxmin ymax 1.5 inch sub lineto
@Lclosepath
@Lgsave
@Lcurrentgray 1 setgray fill setgray
@Lgrestore
@Lcurrentlinewidth 1 setlinewidth stroke setlinewidth
@L% Add the label header
@L%---------------------
@L/Helvetica findfont .2 inch scalefont setfont
@L% Date --------------------------------------
@Lxmin .25 inch add ymax .2 inch sub moveto
@L(Date: ) show date show
@L% Time
@LPrintWidth 1.5 inch sub ymax .2 inch sub moveto
@L(Time: ) show time show
@L% Job Number
@LPrintWidth 2 div ymax .2 inch sub moveto
@Ljobid stringwidth pop
@L( : ) stringwidth pop
@Lname stringwidth pop
@Ladd add 2 div
@Lneg 0 rmoveto
@Ljobid show ( : ) show name show
@L% Underline label header
@Lnewpath
@Lxmin ymax .3 inch sub moveto xmax ymax .3 inch sub lineto
@Lclosepath
@Lstroke
@L% Add the username
@L%-----------------
@L/Helvetica-Bold findfont 1 inch scalefont setfont
@Lnewpath
@Lxmin ymax 1.25 inch sub moveto
@LPrintWidth name CenterString true charpath
@Lclosepath
@Lgsave
@LGray setgray fill
@Lgrestore
@Lstroke
@Lshowpage
@E


Nu moet er alleen nog de computernaam bij...