dolibarr  7.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:
+ Collaboration diagram for printing_printgcp:

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 listAvailablePrinters ()
 Return list of available printers. More...
 
 getlist_available_printers ()
 Return list of available printers. More...
 
 print_file ($file, $module, $subdir='')
 Print selected file. More...
 
 sendPrintToPrinter ($printerid, $printjobtitle, $filepath, $contenttype)
 Sends document to the printer. More...
 
 list_jobs ()
 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

printing_printgcp::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

References conf(), and dol_print_date().

Member Function Documentation

printing_printgcp::getlist_available_printers ( )

Return list of available printers.

Returns
array list of printers

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

References conf(), and print.

Referenced by listAvailablePrinters().

printing_printgcp::list_jobs ( )

List jobs print.

Returns
int 0 if OK, >0 if KO

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

References conf(), and dol_print_date().

printing_printgcp::listAvailablePrinters ( )

Return list of available printers.

Returns
int 0 if OK, >0 if KO

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

References getlist_available_printers(), and img_picto().

printing_printgcp::print_file (   $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 283 of file printgcp.modules.php.

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

References conf().


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