dolibarr  20.0.0-beta
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:
Inheritance graph
[legend]
Collaboration diagram for printing_printgcp:
Collaboration graph
[legend]

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
 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 35 of file printgcp.modules.php.

Constructor & Destructor Documentation

◆ __construct()

printing_printgcp::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Reimplemented from PrintingDriver.

Definition at line 100 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 255 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 208 of file printgcp.modules.php.

◆ listJobs()

printing_printgcp::listJobs ( )

List jobs print.

Returns
int 0 if OK, >0 if KO

Definition at line 447 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 327 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 378 of file printgcp.modules.php.


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