How do I change font size in Scheduler.NET

Hello,

I’m using the export service to create PDF of the scheduler. I’d like to change the font size in the PDF… how do I accomplish this?

I changed the date format prior to print like this:

function toPDF_reconfigure() {

      // changing date format prior to pdf export
        scheduler.templates.timeline_scale_date = function (date) {
            return (date.getMonth() + 1) + "/" + date.getDate();
        }
       
        
        scheduler.updateView();
        
        
        document.getElementById('hprint').click(); // forcing export service


       // reverting back date format for scheduler in page
        scheduler.templates.timeline_scale_date = function (date) {
        return getDayAbbrev([date.getDay()]) + "<br/>" + date.getDate();
        };
      
        scheduler.updateView();
      
    }

is there a way to change the font size?

Hello,

You can add an element (for example div) and set required styles to it’s class.

scheduler.templates.timeline_scale_date = function (date) {
return “

” +(date.getMonth() + 1) + “/” + date.getDate() +"
";
}

Thanks for the reply… I tried what you said and although the font size changes in the view it doesn’t change the styling for the PDF export.

I’m trying to get the date to fit and also the event text to fit (ie. removing the ‘…’) using the online pdf export… any ideas how I can fix this?

Hello,

Please, check the next sample:
docs.dhtmlx.com/scheduler/snippet/04eee9ab

Current version of DHTMLX Scheduler doesn’t allow to provide different templates for the export states.
Please apply a custom styles in your app using the same way from the demo above.

docs.dhtmlx.com/scheduler/pdf.ht … outputfile:

Thanks again for the example but I’m using scheduler.NET and get this error when I try your export method I get the following error:

Uncaught TypeError: scheduler.exportToPDF is not a function(…)

I’m calling the PDF export using @Model.ToPDF() method using @model DHTMLX.Scheduler.DHXScheduler on my cshtml/razor view