Export pdf (multiple pages one file)

I am performing the page-wise export operation of my Gantt component.
I took as an example the code that appears in the documentation, but I do not get the same result, because in my code X downloads are made in different documents, but in the example in the documentation, a file with various pages is simply downloaded, but it is not replicate it.

var width = 297 / (25.4 / 144)
      var totalWidth = this.ganttComponent.$task_bg.scrollWidth + this.ganttComponent.$grid.scrollWidth

      for (var i = 0; i < totalWidth; i += width) {
        this.ganttComponent.exportToPDF({
          header: `<style>#gantt_here{left:-${i}px;position: absolute;}</style>`,
          raw: true,
          additional_settings: {
            format: 'A3'
          }
        })
      }

Do you have any ideas?

Hello Agustin,
When you use a format with the limited sizes, there is no way to include all the contents of Gantt unless you shrink the chart.
To shrink the chart, you need to change the zoom level, and in that case, you don’t even need the export function as you can do that right from the browser you are using.
Here is an example:


https://snippet.dhtmlx.com/zntzpuij

Otherwise, you need to export Gantt by portions and make several exports depending on the width of the chart. Right now, there is no way to combine these separate exports into a single file. You will need to do it manually using other programs or node.js applications.

Also, have you checked the information regarding blocked popups?
When you try to download multiple pages, the browsers can block that and allow downloading only a single page:
exportToPDF Gantt Docs.

If the files are correctly downloaded, but not all the chart is exported, it is hard to suggest what might be wrong as I don’t see your code.
In that case, please add your configuration to the following snippet and make sure that the issue is reproduced there:

Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.