Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Jun : Printer direct communication - Total printed PageCount

www.cryer.info
Managed Newsgroup Archive

Printer direct communication - Total printed PageCount

Subject:Printer direct communication - Total printed PageCount
Posted by:"Zed Fury" (mrzed0..@freemail.hu)
Date:20 Jun 2006 07:01:09

Hi !

I have a problem and do not know where to look.
Many printers have an inner counter for the total amount of printed pages (some one for the black&white and one for the colored printings).

And I have to ask this values somehow mainly from HP and Minolta printers.

I read somewhere there is two solutions: SNMP for network printer servers, @PJL for local printers.

How can I use the direct @PJL commands from Delphi ?
I tried to send '@PJL INFO PAGECOUNT<CR><LF>' with the WritePrinter,
and I tried to send
<ESC>%-12345X@PJL <CR><LF>
@PJL COMMENT Using PJL INFO PAGECOUNT <CR><LF>
@PJL ECHO 06:53:29.3 1-25-93 <CR><LF>
@PJL INFO PAGECOUNT <CR><LF>
<ESC>%-12345X
Do not know what is the difference, and do not know if it successed, because I do not know how to listen for the answear. Any suggesions?

Do I now it good, that this works only for local printers?

The other, I never tried to send SNMP messages. If I have the MIB for the printer how and what should I send out with the Indy idSNMP component?

in the MIB is this:
pcl-total-page-count OBJECT-TYPE
    SYNTAX  INTEGER
    ACCESS  read-only
    STATUS  optional
    DESCRIPTION
                "Total number of PCL pages printed by the device.
                Additional information:
                In LaserJet 4050 Series the PCL page count is kept in NVRAM, and the NVRAM value is updated at least every 10 pages.  NOTE: The value returned by this object will be incremented every page but if power is lost between NVRAM updates, up to 9 pages of the page count may be lost.  The page count counter will be reset to zero after 16,777,215 (2^24-1) pages.
                The page count is incremented when a sheet of media is pulled from an input tray. A duplex printed sheet will cause this counter to be incremented by two."
::= { pdl-pcl 5 }

postscript-total-page-count OBJECT-TYPE
...
duplex-page-count OBJECT-TYPE
...

Thanks,
ZF

Replies:

www.cryer.info
Managed Newsgroup Archive