Page 1 of 1

[ANGULAR] How to send additional data in the PDF Export ?

Posted: Tue May 17, 2022 6:35 pm
by mv2022

In the pdf export, is there a way to send additional data like a project number to the API using the fetchOption?

      fetchOptions: {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${Token.id_token}`
        }
      },  

Re: [ANGULAR] How to send additional data in the PDF Export ?

Posted: Wed May 18, 2022 7:35 am
by alex.l

The easiest way I see is to use https://bryntum.com/docs/gantt/api/Gantt/feature/export/PdfExport#event-beforePdfExport

    listeners : {
        beforePdfExport({ config }) {
            config.client.features.pdfExport.fetchOptions.reportNumber = 'Very first';
        }
    },