DayPilot Pro 4.9

Released on July 2, 2008 (build 1456).

Main features

(F73) PNG/GIF/JPG/BMP Export (DayPilot Calendar)

A new server-side Export() method is available in DayPilot Calendar:

  • It's a method of DayPilotCalendar class (i.e. no special control required).
  • It supports all main bitmap image formats: PNG, GIF, JPG, BMP... (all formats supported by Bitmap.Save()).


  • Print the exported image easily.
  • Save the exported image to a file.
  • Non-web applications:
    • Show a read-only calendar in WebForm applications
    • Include it in PDF files generated on the server
    • Include it in generated e-mails

Usage modes:

  • Special page: Place DayPilotCalendar (with the same configuration as on the dynamic page) on a special page and overwrite the Response stream in all cases.
  • PostBack: Use a button on an existing page and overwrite the Response stream in the button Click event handler (returns the image after clicking a button).
  • Desktop/server/console applications: Create the control dynamically and export the image from any other kind of application.


public MemoryStream Export(ImageFormat format);
public MemoryStream Export(ImageFormat format, int scrollPosition);


    protected void ButtonExport_Click(object sender, EventArgs e)
        int hourHeight = DayPilotCalendar1.CellsPerHour*DayPilotCalendar1.CellHeight;

        Response.ContentType = "image/png";
        MemoryStream img = DayPilotCalendar1.Export(ImageFormat.Png, 9 * hourHeight);