PDF Export in Month View

Hi

I’m currently updating dhtmlxScheduler to version 7.2.3, and I’m getting the following JavaScript error.

From what I can see, the structure has changed compared to the earlier version 6.0.5. Back then, there was a tagName with value “TABLE”, which seems to be missing now. Because of that, the code runs into the else block where the variable yh is not defined.


Before Update:

We’re doing the export like this:
scheduler.toPDF(‘index.php?pageid=22231&id=$lapp&rasterid=’ + rasterid + ‘&first=’ + scheduler.config.first_hour + ‘&last=’ + scheduler.config.last_hour, ‘fullcolor’)

Is this a problem on our side? How can we fix or adapt the problem?

Kind regards
Jonas

Hello @Jonas1 ,

As I can see in the provided code, you are using the “toPDF” method(which refers to really old scheduler versions).

The current export method is exportToPDF:
https://docs.dhtmlx.com/scheduler/api__scheduler_exporttopdf.html

Technically, changing export method should solve the issue, here is a demo with Export + Month view:
https://snippet.dhtmlx.com/vkc50leg

If it won’t fix the issue, could you please reproduce issue in the snippet above(open the demo => reproduce the issue => click the “Save” button => send me the new link)?

Kind regards,

Is it possible to add customization options to the new export function, since we have a lot to configure there? Furthermore, we need to perform the local export rather than using the online export service due to our data privacy requirements, and we have both Linux and Windows systems.

Would a fix for the older toPDF be an option? That way, we could gradually transition to the new logic on our side.

Kind regards,