Page 3 of 4

Re: [ANGULAR] The export function has no style

Posted: Thu Dec 08, 2022 3:23 am
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);
    });

Re: [ANGULAR] The export function has no style

Posted: Thu Dec 08, 2022 5:46 am
by alex.l

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


Re: [ANGULAR] The export function has no style

Posted: Thu Dec 08, 2022 7:10 am
by shimnx

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


Re: [ANGULAR] The export function has no style

Posted: Thu Dec 08, 2022 2:43 pm
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


Re: [ANGULAR] The export function has no style

Posted: Mon Dec 12, 2022 3:06 am
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


Re: [ANGULAR] The export function has no style

Posted: Mon Dec 12, 2022 2:16 pm
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


Re: [ANGULAR] The export function has no style

Posted: Tue Dec 13, 2022 4:13 am
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


Re: [ANGULAR] The export function has no style

Posted: Tue Dec 13, 2022 9:04 am
by shimnx

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


Re: [ANGULAR] The export function has no style

Posted: Tue Dec 13, 2022 1:09 pm
by shimnx

Is it a version problem


Re: [ANGULAR] The export function has no style

Posted: Tue Dec 13, 2022 1:18 pm
by alex.l

Did you figure out with your problem now?