DayPilot Scheduler can be exported to JPEG image using the client-side API.
Note that JPEG is not the optimal export format. The nature of the exported image (rectangular shapes, blocks of uniform colors) makes it work much better with PNG. The same image exported as PNG usually has about 50% smaller size and better image quality (PNG uses lossless compression).
However, the JPEG format can be used when exporting the Scheduler to PDF. Including JPEG in the PDF document will reduce the output size. If you insert a PNG it will be expanded to a raw bitmap.
JavaScript
You can export the Scheduler using exportAs() method:
DayPilot.Scheduler.exportAs(format[, options]);
The optional options parameter lets you specify the Scheduler area to be included in the exported JPEG image (area), magnification (scale) and JPEG quality (quality).
Example
<div id="dp"></div> <div class="space"> Area: <select id="area"> <option value="viewport">Viewport</option> <option value="full">Full</option> </select> </div> <div class="space"> <a href="#" id="export-button">Export</a> <a href="#" id="download-button">Download</a> </div> <div id="export"></div> <script type="text/javascript"> var dp = new DayPilot.Scheduler("dp"); // config ... dp.init(); $(document).ready(function() { $("#export-button").click(function(ev) { ev.preventDefault(); var area = $("#area").val(); var element = dp.exportAs("jpeg", {area: area}).toElement(); $("#export").html('').append(element); }); $("#download-button").click(function(ev) { ev.preventDefault(); var area = $("#area").val(); dp.exportAs("jpeg", {area: area}).download(); }); }); </script>