search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Scalability of export PNG

Asked by Olivier Rossel
5 days ago.

Hello.
We currently try to export a PNG from a scheduler with 25000 events. We get an empty PNG whenever we go beyond 10000 events. So maybe 25000 events is too much for the PNG export.

We have also discovered that some event might have been wrongly inputed, and might have an end date that is before the start date. Which might cause problems with the export PNG.

It will take time to correct this data issue, but as a general question, can we agree that 25000 events should be ok for the export PNG feature?

Answer posted by Dan Letecky [DayPilot]
5 days ago.

The export is performed on the client side using a canvas element and browsers limit the maximum size of the canvas area. If the exported area exceeds the maximum size the browser won't be able to export the image.

But there is no limit of number of events in the exported image.

I recommend splitting the image into smaller segments. Take a look at the following tutorials that show how to split the exported area.

By time (horizontally):
https://code.daypilot.org/73551/html5-scheduler-pdf-export-javascript

By resources (vertically):
https://code.daypilot.org/76551/html5-scheduler-paged-pdf-export

Comment posted by Olivier Rossel
5 days ago.

If this canvas trick is used, I don't understand why the custom HTML in cells is not available in the export PNG feature.

Comment posted by Olivier Rossel
5 days ago.

(in events, not in cells. Sorry for the mistyping)

Answer posted by Olivier Rossel
5 days ago.

Ok got my answer:
Googling "can html elements be added to a canvas?" the answer is NO.
So you have your own routine to redraw a scheduler in a canvas, and cannot take benefit from HTML elements.

New Reply
This reply is
Your name (optional):