scheduler - export to pdf issue

I am a user of your scheduler plugin and I have an issue with the exportToPDF method.

Actually I need to convert to pdf an entire month of the scheduler, including a custom html header, with A4 and landscape mode parameters. But there is my issue, the export to a pdf file works but the file does not display the last calendar week, it seems to have not enough space. When I try to include custom css to reduce the size of the days square, the events are not rendered on the right line.

Is there any solution to print my pdf file with all the days in the month ?

Scheduler version used: v.4.3.1 and a call to export.dhtmlx.com/scheduler/api.js

Any help would be appreciated,
thanks.

It seems like you have a big number of events on Month view.
In this case you could try to decrease bar_height and month_head_height properties before export and then set it back.
docs.dhtmlx.com/scheduler/api__s … other.html

Thanks for your answer, reducing the bar height helped a bit but i still can’t see the last week of this month, and I don’t have so many events scheduled, no moire than 2 or three per day.

Any more idea ? :frowning:

By the way if I reduce the height of the dhx_month_body squares, the events are no longer on the right week…

I noticed a large blank space beneath “This document is created with dhtmlx…”, is there a way to reduce this section please ??

Please attach the example of the exported file with the incorrect spacing.

There it is
calendar_with_header.pdf.zip (25.2 KB)

Hi,

Can you please confirm that you are using exportToPDF API and not older toPDF API (docs.dhtmlx.com/scheduler/pdf_v4.html)

exportToPDF provides the exactly the same output as client side code on a moment of export. So to have week missed in the PDF you have must similar week missed in the client side view of a scheduler. The PDF file which you have provided demonstrate the issue, but I can’t reconstruct it locally, unfortunately.

Also, if you are using exportToPDF, please try to use exportToPNG and check does it provide a valid output or it is broken in the same way.

If I switch to month view, all weeks are properly displayed so I don’t think it is client-side view problem.

I include export.dhtmlx.com/scheduler/api.js on page load and I am using javascript function :

scheduler.setCurrentView(viewedDate, "month");
scheduler.exportToPDF({
                    format: "A4",
                    name: "calendar.pdf",
                    zoom: 1,
                    orientation: "landscape",
                    header: 'some css and html'
});

So actually we don’t use your php library for now, if I use exportToPng instead, the output still does not display the last week.

The only way to see the last week is to delete the html header given in exportToPDF call.

Hi,

I arfil’s coworker.

I’m curious, could we not use the blank space at the bottom of the month calendar?

It should be sufficient to display the main infos.

Regards,

Hello,

Following the advice from Sales Department, I post a comment to boost the topic on first page.

Thanks a lot for your help.


Despite our tests, we still can’t generate a PDF with the whole informations : planning & header.

It seems that the resizing option does not work with the dhtmlx module we are using. Is it an option which is unlocked by the licensed version?

We would like use these features on a few more projects, but this header/planning feature is more than required. We cannot print a planning which does not display 5 or 6 weeks a month when a header is added.

Thank you so much for your help,