printing_printgcp
class printing_printgcp extends PrintingDriver (View source)
Class to provide printing with Google Cloud Print
Constants
| LOGIN_URL |
|
| PRINTERS_SEARCH_URL |
|
| PRINTERS_GET_JOBS |
|
| PRINT_URL |
|
Properties
| DoliDB | $db | ||
| string | $error | from PrintingDriver | |
| string[] | $errors | from PrintingDriver | |
| string | $name | ||
| string | $desc | ||
| string | $resprint | from PrintingDriver | |
| string | $active | ||
| string | $picto | ||
| array<string|int, string|array{varname: string, info: string, type: "info", renew?: string, delete?: string}|array{enabled: int<0, 1>, type: "submit"}> | $conf | ||
| string | $google_id | ||
| string | $google_secret |
Methods
Constructor
Return list of printing driver
Return list of available printers
Return list of available printers
Print selected file
List jobs print
Return list of available printers (internal format)
Sends document to the printer
Details
__construct($db)
Constructor
@param DoliDB $db Database handler
static
listDrivers($db, int $maxfilenamelength = 0)
Return list of printing driver
@param DoliDB $db Database handler
getDesc()
Return description of Printing Module
@return string Return translation of key PrintingModuleDescXXX where XXX is module name, or $this->desc if not exists
listAvailablePrinters()
Return list of available printers
@return int 0 if OK, >0 if KO
getlistAvailablePrinters()
Return list of available printers
@return array<array{name:string,displayName:string,id:string,ownerName:string,status:string,connectionStatus:string,type:string}> list of printers
int
printFile(string $file, string $module, string $subdir = '')
Print selected file
int
listJobs($module = null)
List jobs print
@param ?string $module module
getlistAvailableGcpPrinters()
Return list of available printers (internal format)
@return array{available:array<array{name:string,displayName:string,id:string,ownerName:string,status:string,connectionStatus:string,type:string}>} list of printers
sendPrintToPrinter($printerid, string $printjobtitle, $filepath, $contenttype)
Sends document to the printer
@param string $printerid Printer id returned by Google Cloud Print