I am using the scheduler app in timeline-view and right now i am trying to make use of the “exportToPDF”-function. Basically this works pretty good, but with a single export i could get 4-5 pages in landscape mode. This is how i use it:
The header (Months & Weeks) needs to be on every single one of these pages - how can i do that?
You can do it with custom styles, that will freeze the navigation section, so it will be displayed on every page. In addition, you will have to some top padding for the data area, to push them from the frozen nav line(or the top of the data area will be hidden).
The styles may look like follows(still can be modified, but shows the main idea):
Sometimes the rows are split between two pages… is there a way to workaround?
There is no built-in option for that, but as a workaround you can manually change the height of sections in order to prevent the splitting between pages, like follows:
// Change the dy in order to avoid splitting sections
scheduler.getView('timeline').dy = 63.4;
scheduler.setCurrentView(); // redraws scheduler dy
scheduler.exportToPDF({...
// Change the dy back to default
scheduler.getView('timeline').dy = 50;
scheduler.setCurrentView(); // redraws scheduler dy
thank you for your ideas and the workaround to place the header properly on every page - This works!
Problem now is the padding between the header- and data section. In your example it does not work either.
Just change the margin-top to 30px and you see that “Apartment 4” on second page is hidden behind the header… plus the last “Apartment 4” gets overflow hidden at the end of the table.
Just change the margin-top to 30px and you see that “Apartment 4” on second page is hidden behind the header…
As I understand, you mean changing margin of the dhx_cal_header (20 to 30) - in this case, you also should increase margin for the dhx_cal_data(60 to 70), in order to avoid the overflow on the second page.
So the top section of the data won’t be hidden by the header.
Regarding this part:
plus the last “Apartment 4” gets overflow hidden at the end of the table.
thank you and sorry for the confusion – I actually meant the margin of dhx_cal_data (60 to 30).
Point is, that in your updated demo “Apartment 24” is missing in the exported file. It is clearly hidden behind the header on the second page. See here: planer.pdf (45.8 KB)
This on the other hand works perfectly for the problem with overflow at the end of the table:
.dhx_cal_container{
padding-bottom: 60px;
}
Kind regards
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan