dolibarr 21.0.0-beta
printing_printgcp Class Reference

Class to provide printing with Google Cloud Print. More...

Inheritance diagram for printing_printgcp:
Collaboration diagram for printing_printgcp:

Public Member Functions

 __construct ($db)
 Constructor.
 
 listAvailablePrinters ()
 Return list of available printers.
 
 getlistAvailablePrinters ()
 Return list of available printers.
 
 printFile ($file, $module, $subdir='')
 Print selected file.
 
 sendPrintToPrinter ($printerid, $printjobtitle, $filepath, $contenttype)
 Sends document to the printer.
 
 listJobs ($module=null)
 List jobs print.
 
- Public Member Functions inherited from PrintingDriver
 getDesc ()
 Return description of Printing Module.
 

Additional Inherited Members

- Static Public Member Functions inherited from PrintingDriver
static listDrivers ($db, $maxfilenamelength=0)
 Return list of printing driver.
 

Detailed Description

Class to provide printing with Google Cloud Print.

Definition at line 36 of file printgcp.modules.php.

Constructor & Destructor Documentation

◆ __construct()

printing_printgcp::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Reimplemented from PrintingDriver.

Definition at line 94 of file printgcp.modules.php.

References $conf, conf(), dol_print_date(), getDolGlobalString(), and newToken().

Member Function Documentation

◆ getlistAvailablePrinters()

printing_printgcp::getlistAvailablePrinters ( )

Return list of available printers.

Returns
array{available:array{name:string,displayname:string,id:string,ownerName:string,status:string,connectionStatus:string,type:string}} list of printers

Reimplemented from PrintingDriver.

Definition at line 250 of file printgcp.modules.php.

References $conf.

Referenced by listAvailablePrinters().

◆ listAvailablePrinters()

printing_printgcp::listAvailablePrinters ( )

Return list of available printers.

Returns
int 0 if OK, >0 if KO

Reimplemented from PrintingDriver.

Definition at line 203 of file printgcp.modules.php.

References $conf, getlistAvailablePrinters(), img_picto(), and newToken().

◆ listJobs()

printing_printgcp::listJobs ( $module = null)

List jobs print.

Parameters
?string$modulemodule
Returns
int 0 if OK, >0 if KO

Reimplemented from PrintingDriver.

Definition at line 446 of file printgcp.modules.php.

References $conf, and dol_print_date().

◆ printFile()

printing_printgcp::printFile ( $file,
$module,
$subdir = '' )

Print selected file.

Parameters
string$filefile
string$modulemodule
string$subdirsubdir for file
Returns
int 0 if OK, >0 if KO

Reimplemented from PrintingDriver.

Definition at line 323 of file printgcp.modules.php.

References $conf.

◆ sendPrintToPrinter()

printing_printgcp::sendPrintToPrinter ( $printerid,
$printjobtitle,
$filepath,
$contenttype )

Sends document to the printer.

Parameters
string$printeridPrinter id returned by Google Cloud Print
string$printjobtitleJob Title
string$filepathFile Path to be send to Google Cloud Print
string$contenttypeFile content type by example application/pdf, image/png
Returns
array{status:int<0,1>,errorcode:string,errormessage:string} status array

Definition at line 374 of file printgcp.modules.php.

References $conf.


The documentation for this class was generated from the following file: