toPDFRange

exports several scheduler's views to a PDF document (can be used for printing)

void toPDFRange(Date from,Date to,string view,string path,string color);

Parameters

fromDatethe date to start export events from
toDatethe date to export events until
viewstringthe name of a view that the export should be applied to
pathstringthe path to the php file which generates a PDF file (details)
colorstringthe color map in use

Example

//exports pages of the 'week' view from the 1st January, 2012 
//till the 1st February, 2012
scheduler.toPDFRange(new Date(2012,0,1), new Date(2012, 1,1),'week', 
  'generate.php', 'fullcolor');

Required extension: ext/dhtmlxscheduler_pdf.js
Details

The color parameter of the method can take only one of the values from the predefined set:

  • 'color' - full-color printing (default)
  • 'gray' - prints in shades of black and white
  • 'bw' - uses only black and white colors
  • 'custom' - can be used to enable a custom color map. Requires php coding (details)
  • 'fullcolor' - actual background and text colors that are used while exporting
See also
Back to top