dolibarr  9.0.0
Public Member Functions | List of all members
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. More...
 
 listAvailablePrinters ()
 Return list of available printers. More...
 
 getlistAvailablePrinters ()
 Return list of available printers. More...
 
 printFile ($file, $module, $subdir='')
 Print selected file. More...
 
 sendPrintToPrinter ($printerid, $printjobtitle, $filepath, $contenttype)
 Sends document to the printer. More...
 
 listJobs ()
 List jobs print. More...
 
- Public Member Functions inherited from PrintingDriver
 __construct ($db)
 Constructor. More...
 
 getDesc ()
 Return description of Printing Module. More...
 

Additional Inherited Members

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

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

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

Member Function Documentation

◆ getlistAvailablePrinters()

printing_printgcp::getlistAvailablePrinters ( )

Return list of available printers.

Returns
array list of printers

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

◆ listAvailablePrinters()

printing_printgcp::listAvailablePrinters ( )

Return list of available printers.

Returns
int 0 if OK, >0 if KO

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

◆ listJobs()

printing_printgcp::listJobs ( )

List jobs print.

Returns
int 0 if OK, >0 if KO

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

◆ 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

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

◆ 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 array

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


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