Our pure JavaScript Scheduler component


Post by boyitech »

Greetings!


I'm using scheduler pro's PDF export feature.I successfully sent the request and successfully implemented the functionality. But the server configuration is your back-end server. How can we implement this back-end export method if we develop it ourselves and deploy it on our own server.


Post by Maxim Gorkovsky »

Hello.
If you're looking into implementing the backend, you can check out this repo: https://github.com/bryntum/pdf-export-server/ and do something similar. Protocol is not really described anywhere, but you can infer it easy from code (ignore the queueing part): server receives a JSON with data (html to render + some configs) and returns either JSON with link to the file or the file itself.


Post by boyitech »

Whether the component supports exporting the name of a hidden task

Image


Post by marcio »

Hey boyitech,

It'll export the way it looks on the Scheduler, if you want to export without the name on the task, you'll need to configure the Scheduler to not display the name.

Best regards,
Márcio


Post by boyitech »

I returned the path to the PDF in the backend, and took this path to successfully open it in the browser, but the frontend prompted that the file could not be downloaded.

I didn't find a way to listen for export PDF requests, and I couldn't get the return value of the backend, and the component's built-in download method indicates that there are no files to download.

Image

Image


Post by boyitech »

The exported PDF does not seem to support abbreviation of tree components, and the overflow text will overlap with other columns

Image


Post by marcio »

Hey, regarding the overflow and support abbreviation, could you please provide a sample of data for us to test and use to investigate the problem??

Best regards,
Márcio


Post by marcio »

Also, related to the download, the link provided by the server should be used as a reference in the JS frontend to download, but you need to get that done on the code, you can try some of these approaches https://itnext.io/how-to-download-files-with-javascript-d5a69b749896

Best regards,
Márcio


Post by boyitech »

It seems that the backend address accessed is directly configured in the settings, how can I listen to the request I sent and get the return value.

The problem I'm currently having is that the backend can return the download path correctly, but the frontend can't get it manually, the sending of this request is encapsulated in the brytumn component, and I can't listen to this request.

Image


Post by marcio »

I see, perhaps you could use another approach, you can set https://bryntum.com/products/gantt/docs/api/Grid/feature/export/PdfExport#config-sendAsBinary to true, and from there you'll get the PDF binary itself instead of the server link to download.

Best regards,
Márcio


Post Reply