Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!emory!att!ucbvax!ZOO.TORONTO.EDU!henry From: henry@ZOO.TORONTO.EDU (Henry Spencer) Newsgroups: comp.laser-printers Subject: Re: Counting pages on a HPLJ II Message-ID: <9104191550.AA03501@crayola.cs.UMD.EDU> Date: 18 Apr 91 15:38:19 GMT References: <9104171649.AA25809@crayola.cs.UMD.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Organization: U of Toronto Zoology Lines: 21 Approved: laser-lovers@brillig.umd.edu In article <9104171649.AA25809@crayola.cs.UMD.EDU> matt@EECS.NWU.EDU (Matt Larson) writes: >I am interested in writing a filter that can count the number of pages >printed to an HPLJ II... >Is there a sequence that always means, ``End of the page; print it''? No. In general, counting pages on a LaserJet is a royal pain. Even for text it is not simple, because things like changing the printer's line spacing change how much text gets put on a single page. You have to essentially implement an interpreter for HP-PCL. >... My current guess is that the formfeed character really >means what I think it means, but that it is also possible for >formfeeds to be part of other commands or in some sort of "quoted >string." Correct; *any* binary data can show up in graphics sequences. You really have to understand the escape sequences to follow the structure of the document. -- And the bean-counter replied, | Henry Spencer @ U of Toronto Zoology "beans are more important". | henry@zoo.toronto.edu utzoo!henry