Skip to main content

toPDFRange

Description

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

toPDFRange: (from: Date, to: Date, view: string, path: string, color: string) => void

Parameters

  • from - (required) Date - the date to start export events from
  • to - (required) Date - the date to export events until
  • view - (required) string - the name of a view that the export should be applied to
  • path - (required) string - the path to the php file which generates a PDF file (details)
  • color - (required) string - the 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');

Details

note

The method requires the pdf plugin to be enabled.

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
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.