Our state of the art Gantt chart


Post by shimnx »

I know this method can listen, but the response here does not return specific information about the interface

 window['GanttComponent'].component.gantt.features.pdfExport.export({
            // Required, set list of column ids to export
            columns : window['GanttComponent'].component.gantt.columns.map(c => c.id)
        }).then(result => {
            console.log(result)
            // Response instance and response content in JSON
            let { response } = result;

        window.GanttComponent.component.pdfExport(JSON.parse(window.decodeURIComponent(Base64.decode(localStorage.getItem("userInfo")))).UserName);
    });

Post by alex.l »

Sorry, I don't follow. What is "specific information about the interface"?

All the best,
Alex


Post by shimnx »

Now that pdf has no display style, I have introduced csss in index.html

Attachments
屏幕截图 2022-12-08 131018.png
屏幕截图 2022-12-08 131018.png (66.62 KiB) Viewed 437 times
屏幕截图 2022-12-08 130845.png
屏幕截图 2022-12-08 130845.png (26.11 KiB) Viewed 437 times

Post by Maxim Gorkovsky »

Response from the server contains only a link to a file, nothing more.

Also, if you want to provide params to fetch request, you can try overriding this method: https://bryntum.com/products/gantt/docs/api/Gantt/feature/export/PdfExport#function-receiveExportContent


Post by shimnx »

Sorry, I don't understand the meaning, my question is why the style is not loaded after I export, how should I solve this problem


Post by Maxim Gorkovsky »

Please read this guide carefully, it explains in great details how export procedure works from the server point of view, why style might not get loaded and how to handle it: https://github.com/bryntum/pdf-export-server/blob/main/docs/architecture.md


Post by shimnx »

Sorry, I still don't know how to load the style. One of the examples I uploaded is an official example, which can be exported normally after running, while the other example still cannot load the style. I have compared it for a long time and don't know what it lacks

Attachments
success.zip
(125.94 KiB) Downloaded 35 times
fail.zip
(289.39 KiB) Downloaded 33 times

Post by shimnx »

This is an urgent problem. Could you please help me check the problem? Thank you very much


Post by shimnx »

Is it a version problem


Post by alex.l »

Did you figure out with your problem now?

All the best,
Alex


Post Reply