toPDF
Description
Exports the current view to a PDF document (can be used for printing)
toPDF: (url: string, mode?: string) => void
Parameters
url- (required) string - the path to the server-side PDF convertermode- (required) string - the color map of the resulting PDF document
Example
scheduler.toPDF("./service/generate.php","color");
Details
note
The method requires the pdf plugin to be enabled.
note
The method refers to exporting of dhtmlxScheduler 4.0 or earlier versions.
The second parameter (mode) 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' - prints in black and white only, no color options available
- '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
Related API
Related Guides
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.