I am trying to create a button which allows users to download their project timeline.
const filteredItems = events?.events.forEach((event) => {
const items = 'Event id:' + event.id + " \nCreated date: " + event.created_at + "\nEvent: " + event.body + '\n Event type: ' + event.type
console.log(items);
return items;
});
I have looped through the events in project timeline and stored the useful data in "items". Now I want to create a pdf from the items variable and allow users to download it. I am having a hard time figuring out how to work with creating a pdf in react. Would greatly appreciate your help. Thanks!
I tried pdf renderer but couldn't get the contents inside the pdf file.