Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!mips!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!EECS.NWU.EDU!matt From: matt@EECS.NWU.EDU (Matt Larson) Newsgroups: comp.laser-printers Subject: Counting pages on a HPLJ II Message-ID: <9104171649.AA25809@crayola.cs.UMD.EDU> Date: 17 Apr 91 15:00:03 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: Academic Computing and Network Services, Northwestern University Lines: 26 Approved: laser-lovers@brillig.umd.edu I am interested in writing a filter that can count the number of pages printed to an HPLJ II. The input stream could be plain text or the HP graphics language. Counting pages of text is easy; counting pages of graphics (for example, output from Ghostscript, gnuplot, dvijep, etc.) is the part that has me stumped. Is there a sequence that always means, ``End of the page; print it''? I thought that's what the formfeed character (ASCII 12) did. I tried counting formfeed characters, but that doesn't seem to work: there are way too many. 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." If I am on the right track, then the question is: How do I tell the real formfeeds that mean end of page from the other ones? I have tried looking through the manual, but it doesn't seem to be specific enough. If anyone has done this or knows how to do it, I would appreciate the help. Thanks a lot, Matt Larson -- Matt Larson, Distributed Systems Analyst Academic Computing and Network Services, Northwestern University matt@acns.nwu.edu (708) 491-5366