We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Export to PDF for Schedule Control, that has 100 resources is unreadable

I am setting up a Schedule control to show planned leave for resources for a business.

As we have quite a large number of resources, we page 100 resources at a time (otherwise the browser will lockup).

This works very well, and is performs well in the browser.  An example of our output is here:



Using the example code to export this now to a PDF document, the controller action looks like this (based on samples): 

[HttpPost]
        public void SchedulePdfExport(string scheduleModel)
        {
            try
            {
                PdfExport exp = new PdfExport();
                PdfPageSettings ps = new PdfPageSettings(50f)
                {
                    Orientation = PdfPageOrientation.Landscape
                };

                JavaScriptSerializer serializer = new JavaScriptSerializer();
                SchedulePDFExport convert = new SchedulePDFExport();
                // Here calling the public method to convert the model values to ScheduleProperties type from string type
                ScheduleProperties scheduleObject = convert.ScheduleSerializeModel(scheduleModel);
                // Here converting the schedule appointments data into enumerable object by deserializing              
                IEnumerable scheduleAppointments = (IEnumerable)serializer.Deserialize(Request.Form["ScheduleProcesedApps"], typeof(IEnumerable));
                // Here passing the theme values from enum collection

                PdfDocument document = exp.Export(scheduleObject, scheduleAppointments, ExportTheme.FlatAzure, Request.Form["locale"], ps);
                document.Save("PlannedLeave.pdf", HttpContext.ApplicationInstance.Response, HttpReadType.Save);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

The resultant PDF looks like this:



My question is this: I presume that it's trying to drop all 100 resources onto a single page?  If so, is there a way to get this to export to multiple pages?

If not, what other workarounds / methods should we look at using?  I could always change the page size to something really small (say 20), but then we'd have to export 5 pdfs to get the same result.

Cheers,
Brendan


8 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team July 31, 2017 11:35 AM UTC

Hi Brendan, 
 
Thank you for contacting Syncfusion support. 
 
The known issue “Scheduler is not exporting correctly with many resources” is fixed in our latest version 15.2.0.46 and kindly upgrade your build version to avail the fix. We have attached the below exported PDF where Scheduler has more number of resources for your reference.  
 
Regards, 
Karthigeyan 



                                                                                      




BG Brendan Green August 29, 2017 05:27 AM UTC

Thanks Karthigeyan - I've made the update, and the export is now mostly working.

Ok while the chart export is working well, I am noticing an additional issue.  Please see the following screenshot: