javascript calendar pdf export

You can export the Calendar using exportAs() method on the client side.

Supported export formats:

  • JPEG
  • PNG
  • SVG

You can also embed the output image in a PDF document.

This feature is available since version 8.4.

JavaScript

<div id="dp"></div>

<div>
  <button id="download-button">Download</button>
</div>

<script type="text/javascript">

    var dp = new DayPilot.Calendar("dp");
    // ... config
    dp.init();

    $(document).ready(function() {
        $("#download-button").click(function(ev) {
            ev.preventDefault();
            dp.exportAs("jpeg").download();
        });
    });

</script>

Tutorial