Hallo Joerg,
On Thursday 09 December 2004 08:00, Joerg Thuemmler wrote:
einen cron-job anlegen, der regelmäßig das Verzeichnis checkt,
z.B. aller min und evt. nur, wenn der Psion angeschlossen ist,
hab ich. KCron nimmt allerdings nur alle 5 Minuten, aber das ist
kein Problem im Vergleich zu Linux herunterfahren, Windows starten,
drucken und Linux wieder neu starten.
und der
for dn in *.ps # suche alle ps-Dateien
do
if [ ! -f ${dn}.lock ] # sieh nach, ob schon ein Druck
für then # für diese erfolgt
echo "" >${dn}.lock # lege eine Lock-Datei an
lpr -P<deinDrucker> $dn # drucke
Da nur 1 Drucker angeschlossen ist, habe ich nur: lpr $dn
rm $dn # lösche zu druckende Datei
rm ${dn}.lock # lösche Lockdatei
fi
done
Funktioniert perfekt !!!
Die leere Seite wird wohl im ps-Code vom Psion gemacht. Evt.
kannst Du Deinen Linux-Drucker dazu bringen (falls nicht schon
getan), kein FF anzuhängen, sonst könntest Du evt. in obiges
script ein Löschen des letzten Zeichens (irgendwas mit wc und
head oder so) einfügen, ehe Du die Datei zum lpr schickst.
Wenn ich "ganz normal" ausdrucke (soll heißen z.B. aus einem Editor
oder aus OpenOffice, ...) wird keine Leerseite ausgegeben. Wird
also wohl am Psion Druckertreiber liegen. Da der aber nicht mehr
weiterentwickelt wird, hab ich wohl schlechte Karten.
Im Psion Editor habe ich einfach mal 'eins' eingetippt und dann
ausgedruckt. Nachstehend das erzeugte .ps file.
%!PS-Adobe-3.0
%%Creator: EPOC ps.pd v0.9
%%DocumentFonts: Times-Roman Times-Italic Times-Bold
Times-BoldItalic
%%+ Helvetica Helvetica-Oblique Helvetica-Bold Helvetica-BoldOblique
%%+ Courier Courier-Oblique Courier-Bold Courier-BoldOblique
%%Pages: (atend)
%%EndComments
%%BeginProlog
% Level 1 Prolog for EPOC PostScript printer driver Version 0.9
% Copyright (c) 1999-2001, Andrew Johnson
/EPOCdict 50 dict def EPOCdict begin/bd{bind def}bind
def/Fonts[/Times-Roman/Times-Bold
/Times-Italic/Times-BoldItalic/Helvetica/Helvetica-Bold/Helvetica-Oblique
/Helvetica-BoldOblique/Courier/Courier-Bold/Courier-Oblique/Courier-BoldOblique]def
/EPOCencoding[StandardEncoding 0 128 getinterval aload pop
/.notdef/.notdef/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl
/circumflex/perthousand/Scaron/guilsinglleft/OE/dotlessi/grave/.notdef/.notdef
/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash/tilde
/trademark/scaron/guilsinglright/oe/.notdef/.notdef/Ydieresis/space/exclamdown
/cent/sterling/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine
/guillemotleft/logicalnot/hyphen/registered/macron/ring/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute
/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve
/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex
/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis
/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute
/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis
/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/MTX[1 0 0 -1 0 0]def/Counter 0 def/Fonts[Fonts{findfont dup length
dict begin
{1 index/FID ne{def}{pop pop}ifelse}forall/Encoding EPOCencoding def
Counter
1 add dup/Counter exch store currentdict definefont end MTX
makefont}forall]store
/FontNum 0 def/FontSty 0 def/FontSiz 10 def/FontChg true def/FontLin
0 def
/FontRed 0 def/FontGrn 0 def/FontBlu 0 def/cg{/FontChg true store}
bd
/F{/FontNum exch store/FontSiz exch store cg}bd/B0{/FontSty FontSty
1 not and store cg}bd
/B1{/FontSty FontSty 1 or store cg}bd/I0{/FontSty FontSty 2 not and
store cg}bd
/I1{/FontSty FontSty 2 or store cg}bd/U0{/FontLin FontLin 1 not and
store}bd
/U1{/FontLin FontLin 1 or store}bd/S0{/FontLin FontLin 2 not and
store}bd
/S1{/FontLin FontLin 2 or store}bd/C{/FontBlu exch 256 div
store/FontGrn
exch 256 div store/FontRed exch 256 div store}bd/PageW 0 def/PageH 0
def
/S{/PageH exch store/PageW exch store}bd/P{0 PageH translate 1 -1
scale/MTX
MTX currentmatrix store}bd/L{90 rotate 1 -1 scale/MTX MTX
currentmatrix store}bd
/PS{/PageSave save def MTX setmatrix}bd/PE{PageSave restore
showpage}bd
/PageX 0 def/PageY 0 def/PixScale 72 300 div def/Pixels{PixScale
mul}bd
/X{Pixels/PageX exch store}bd/Y{Pixels/PageY exch
store}bd/T{FontChg{Fonts
FontNum 4 mul FontSty add get FontSiz scalefont setfont/FontChg
false store}if
FontRed FontGrn FontBlu setrgbcolor PageX PageY moveto show
currentpoint FontLin
0 ne{currentfont/FontInfo get dup/UnderlineThickness
known{dup/UnderlineThickness
get}{50}ifelse FontSiz mul 0.001 mul setlinewidth FontLin 1 and 0
ne{gsave dup
/UnderlinePosition known{/UnderlinePosition get}{pop -100}ifelse
FontSiz mul
0.001 mul dup 0 exch neg rmoveto PageX exch PageY exch sub lineto
stroke
grestore}{pop}ifelse FontLin 2 and 0 ne {gsave newpath 0 0
moveto(x)false charpath
flattenpath pathbbox grestore pop pop 0.6 mul dup 0 exch rmoveto
PageX exch PageY
exch add lineto stroke pop}if}if/PageY exch store/PageX exch
store}bd
/ScanLine 2 string def/ScanW 0 def/B{/ScanW exch store/ScanLine
ScanW 8 idiv string
store gsave PageX PageY translate ScanW Pixels 1 Pixels scale 0
setgray ScanW
1 false[ScanW 0 0 -1 0 1]{currentfile ScanLine readhexstring
pop}imagemask grestore}bd
%%EndProlog
%%BeginSetup
595 841 S
P
%%EndSetup
%%Page: ? 1
PS
10 2 F
281 X 336 Y (eins) T
PE
%%Trailer
%%Pages: 1
Ich habe diese Datei schon mehrfach durchgesehen, kann aber leider
nicht erkennen ob/wo das FF für die Leerseite ist :-(
Sorry für das lange Quoting.
Und vielen Dank für dein Skript!!!
Grüße
Wolfgang
--
http://www.golder.de