Exporting as PDF second page blank

Greetings, we experiencing some very weird behaviour of exporting - when we export as PDF, it exports fine, however, it always adding blank second page. And even worse, when we have large number of tasks (sometimes over 3000) - the export as PDF fails at all (Error code - 413 Request Entity Too Large). I presume, that it is because of the limitation of 4 Mb. Is there any fixes to that ? As lots of our cases will have a huge number of tasks. And how we can get rid of the blank second page? We passing our custom CSS when calling gantt.exportToPDF() Any ideas what i may cause? Can’t figure out, the rest (PNG, Excel, iCal and Ms Project) works fine without issues, so the problem is only with the PDF. Thanks.

P.S. Example of custom CSS styles we passing in: gantt.exportToPDF({ raw: true, name:“ProjectGantt.pdf”, header: “.baseline {position: absolute; border-radius: 2px;opacity: 0.6; margin-top: -10px;height: 5px;background: #4EA248;border: 1px solid rgb(255,153,0);} .gantt_task_line, .gantt_line_wrapper {margin-top: -9px; text-indent: -99999px;} .gantt_task_link .gantt_link_arrow{margin-top: -12px;} .today{background-color: #222;z-index: 2;} .status_line {background-color: blue;z-index: 2;} .gantt_dependent_task{ display: none !important;}” });

Hi,

unfortunately, there is no good way other than installing the export locally, where you could tweak settings.

Can you please explain how can I reproduce this issue? I’ve tried exporting baseline demo docs.dhtmlx.com/gantt/samples/0 … lines.html using exportToPDF from your post, but it seemed to be a correct single-page pdf.

Hi Aleksandr, thanks for your reply.

Can you please kindly provide some good documentation on how to achieve that and what is benefit of it? In other words, we will be able to control the size of the file, limit pages(?), what else? Which configuration may help us with exporting to PDF large numbers of tasks (up to 3000 tasks)? Also, it is possible to limit the number of tasks so they will nicely fit on to one page, lets say limit to 50 -100 first tasks only?

Unfortunatelly, cannot reproduce this error, looks like it fixes some how lol

Thank you !