In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Printjobs

Xailer professional forum in English
Responder
Timm
Mensajes: 136
Registrado: Lun Jun 21, 2010 11:01 am

Printjobs

Mensaje por Timm »

Hi!

How can I get information about the print jobs that are currently being printed?
Which printers are currently active, the current page number and total pages.

Best regards

Timm
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Printjobs

Mensaje por ignacio »

Hi,

I'm afraid that information is not given by Xailer. I guess, that information maybe given by the printer spooler which has its own API. I'm sorry I can not offer you better help.

Regard,s
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Timm
Mensajes: 136
Registrado: Lun Jun 21, 2010 11:01 am

Re: Printjobs

Mensaje por Timm »

Hi Ignacio,

I found this code in the google group comp.lang.xharbour:

Código: Seleccionar todo

#include "cstruct.ch"
#include "hbdll.ch"

IMPORT OpenPrinter( par1, par2, par3 ) FROM winspool.drv
IMPORT StartDocPrinter( par1, par2, par3 ) FROM winspool.drv
IMPORT WritePrinter( par1, par2, par3, par4 ) FROM winspool.drv
IMPORT EndDocPrinter( par1 ) FROM winspool.drv
IMPORT ClosePrinter( par1 ) FROM winspool.drv
IMPORT GetJob( par1, par2, par3, par4, par5, par6 ) FROM winspool.drv

   C structure DOC_INFO_1 align 4
      member pDocName    is CTYPE_CHAR_PTR
      member pOutputFile is CTYPE_CHAR_PTR
      member pDataType   is CTYPE_CHAR_PTR
   end C structure

   C structure JOB_INFO_1
      member JobId        is CTYPE_UNSIGNED_LONG
      member pPrinterName is CTYPE_CHAR_PTR
      member pMachineName is CTYPE_CHAR_PTR
      member pUserName    is CTYPE_CHAR_PTR
      member pDocument    is CTYPE_CHAR_PTR
      member pDatatype    is CTYPE_CHAR_PTR
      member pStatus      is CTYPE_CHAR_PTR
      member Status       is CTYPE_UNSIGNED_LONG
      member Priority     is CTYPE_UNSIGNED_LONG
      member Position     is CTYPE_UNSIGNED_LONG
      member TotalPages   is CTYPE_UNSIGNED_LONG
      member PagesPrinted is CTYPE_UNSIGNED_LONG
      member Submitted    is CTYPE_VOID_PTR
   end C structure
Unfortunately this only works with xHarbour.
Do you have a hint for me, how I can port the code to Harbour?

Best regards

Timm
Responder