The exportAs() method exports the JavaScript Calendar component in the specified image format.
DayPilot.Calendar.exportAs(format[, options]);
format
: "svg"
| "png"
| "jpeg"
options.area
- specifies the exported area ("viewport"
or "full"
); if not specified, "viewport"
will be used
options.quality
- quality of the output JPEG image (applies only to format: "jpeg"
); if not specified, 0.92
will be used
options.scale
- sets the scale of the output; if not specified, 1
will be used (to magnify the output to 200%, use a value of 2)
A DayPilot.Export
object that provides the following methods:
toElement()
- returns DOM element with the image (<svg> or <img>)
toHtml()
- returns DOM element as HTML
toDataUri()
- returns a dataURI string (SVG or image data)
toBlob()
- returns a Blob object
download(filename)
- forces download of the image
print()
- prints the exported image using the browser print dialog