Home Unanswered Active Tags New Question

How to Print all th hours of the day?

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.
Asked by Anonymous 3 years ago.
Replies

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.

Comment posted by Dan Letecky 3 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java