On the client side, you can export the Scheduler in one of the following formats:

The exported image can also be immediately printed (using the standard browser print dialog) after export. The printing is supported for all formats but you should use SVG for the best results.

The image rendered during the export is not created using HTML (which is used for rendering the Scheduler in the browser). That results in some limitations:

  • The maximum size of JPEG and PNG images is limited by the browser (you may not be able to render Scheduler view with a long timeline using a single export).
  • Custom HTML is not supported (inside events, row headers, time headers).

HTML Support

If you customize the HTML using onBefore*Render events you will see the HTML in the exported image as plain text.

At this moment, the export only supports plain text that includes line breaks.

You can use the customization event handlers (see below) to supply alternative text.

Export Customization

There are special client-side event handlers that you can use to customize the output:

  • onBeforeCellExport
  • onBeforeEventExport
  • onBeforeRowHeaderExport
  • onBeforeTimeHeaderExport

Cell Customization during Export

DayPilot.Scheduler.onBeforeCellExport lets you customize the following properties:

  • args.text
  • args.horizontalAlignment
  • args.backColor

Event Customization during Export

DayPilot.Scheduler.onBeforeEventExport lets you customize the following properties:

  • args.text
  • args.fontSize
  • args.fontFamily
  • args.fontStyle
  • args.fontColor
  • args.backColor
  • args.borderColor
  • args.horizontalAlignment
  • args.barHeight

Example that uses custom event text during export:

dp.onBeforeEventExport = function(args) {
  args.text = args.e.text() + "\n" + args.e.start().toString("M/d/yyyy");
};

Row Header Customization during Export

You can use DayPilot.Scheduler.onBeforeRowHeaderExport to customize the following properties:

  • args.text
  • args.backColor
  • args.fontSize
  • args.fontFamily
  • args.fontStyle
  • args.fontColor
  • args.borderColor
  • args.horizontalAlignment

Time Header Customization during Export

You can use DayPilot.Scheduler.onBeforeTimeHeaderExport to customize the following properties:

  • args.text
  • args.backColor (since 8.3.2737)