search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to Print all th hours of the day?

Asked by Anonymous
13 years ago.
Here is my Print: int hourHeight = DayPilotCalendar1.CellsPerHour * DayPilotCalendar1.CellHeight; Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=BSW_Calendar.png"); MemoryStream img = DayPilotCalendar1.Export(ImageFormat.Png, 9 * hourHeight); img.WriteTo(Response.OutputStream); Response.AppendHeader("Content-Length", img.Length.ToString()); //Sends only the File with no Extra bytes Response.Flush(); Response.End(); I tried: DayPilotCalendar1.Export(ImageFormat.Png, 15 * hourHeight); DayPilotCalendar1.Export(ImageFormat.Png, 24 * hourHeight); But I always get 9 hours thanks.
Comment posted by Dan Letecky
13 years ago.

The second argument of Export() sets the scroll position, not the height.

In order to print full page, try:

DayPilotCalendar1.HeightSpec = HeightSpecEnum.Full;

Or you can keep HeightSpec="BusinessHours" and change BusinessBeginsHour and BusinessEndsHour according to your needs.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.