|
Re: Simple accounting filter/backend (With Perl or another script languag: msg#00041printing.cups.devel
Jerome Alet wrote: > The fact that PostScript is a real and complete computer language doesn't > help, because only a complete parser (gs ?) can deal with such constructs. > The "pseudo" code I described above is just a workaround, it can easily be > bypassed. Thanks a lot :-) !! So, That's the method you used in Pykota ? Anyway, lets imagine users are non-malicious: Your method should work with all (most) of the "normal" printjobs ? Ok, I tried manually with "grep" with a document printed to file (2 pages, and I asked 37 copies...): $ grep -i "1 dict dup " toto.ps 1051 dict dup begin 1 dict dup /NumCopies 37 put setpagedevice 1 dict dup /NumCopies 37 put setpagedevice Sounds good :) !!! So, I can assume here that NumCopies shows the right value, and appears 2 times because of the 2 pages length of the document... I'm right ? Ok, this document comes from Mozilla Firefox. I'll try with others. But, something I can't explain: $ grep -i "Bounding" toto.ps %%BoundingBox: 0 0 612 792 #Only one Bounding box ? Although: $ /usr/bin/gs -sDEVICE=bbox -dNOPAUSE -c save pop -f toto.ps -c quit 2>&1 %%BoundingBox: 0 0 612 792 %%HiResBoundingBox: 0.036000 0.324000 611.891981 791.981976 %%BoundingBox: 0 0 612 792 %%HiResBoundingBox: 0.036000 0.324000 611.891981 791.981976 Ok, two pages, but no 37 copies :) Lastly: $ grep -i "BeginNonPPDF" toto.ps <nothing> So, what I need now is to make the algorhythm... I need to sort these methods from most accurate to less accurate, as to correctly nest my "IFs" ;) What do you think about it ? |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: Simple accounting filter/backend (With Perl or another script language): 00041, Jerome Alet |
|---|---|
| Next by Date: | Re: Re: Simple accounting filter/backend (With Perl or another script language): 00041, Nayco |
| Previous by Thread: | calling a gtk program from a backend cupsi: 00041, serge . sterck-hpIq405ttXSzQB+pC5nmwQ |
| Next by Thread: | Re: Simple accounting filter/backend (With Perl or another script language): 00041, Jerome Alet |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |