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

Client-Side JPEG Export for custom headers and custom Event content

Asked by Alex5
24 days ago.

We have an Angular implementation of DayPilot pro.
We want to generate a custom PDF page and therefore take advantage of the JPEG Export.
But the export doesn’t display our custom styles and components, also doesn’t display the custom headers, but the default ones.

Is there a way to capture the actual visual representation? Otherwise we well just make a screenshot of the page instead of the JPEG Export.

Thank you.

Comment posted by Alex5
22 days ago.

Basically headers of type “Manual” are not displayed in the “Screen capture” and the Event content, generated with onBeforeEventDomAdd, where we create a component to viewContainerRef.createComponent and attach it to args.element.

Comment posted by Alex5
21 days ago.

One more thing:
If I set event.text, the jpeg export creates the text, but if I set event.html, the exported events are empty, only the background color is visible, the text is not.

Would be great if I could at least use the html option, as it allows to style the event text a little better (multi line, font-weight, paddings, colors, font-size etc…)
The only thing I can do with event.text is using the newline character “\n“ to get multiple lines.

If we could export the original board 1:1 with our custom injected angular components, buttons etc, that would be even better.

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

The capabilities of the image export are limited. Basically, you can export plain text and active areas.

If you need an exact copy and are happy with the current viewport, it’s better to make a screenshot.

If you want to export custom ranges, you can use onBeforeTimeHeaderExport and try to replicate the appearance using active areas. Active areas support images, padding, background and foreground color, vertical and horizontal alignment during image export.

New Reply
This reply is
Attachments:
or drop files here
Your name (optional):