PDF not rendering properly

I have a javascript query that generates a PDF. It was working perfectly fine for about 2 months. Two days ago it stopped generating properly. It seem like only the top part of my page generates .

here is the java script query.:

const postDayReport = `Post Day Report`;
const startDate = moment(dateRange1.value.start).format('YYMMDD');
const endDate = moment(dateRange1.value.end).format('YYMMDD');

let pdfName;

// Check if startDate and endDate are the same
if (startDate === endDate) {
  pdfName = postDayReport + "_" + startDate + '-' + moment(dateRange1.value.start).format('ddd');
} else {
  pdfName = postDayReport + " " + startDate + "-" + endDate;
}

// Download the page with the updated PDF name
utils.downloadPage(pdfName, { componentsToExclude: ["tabs1" ,"button1"] });

I will also attach an image of how it should look and how its generating now. No one has been changes to it. I have also tried refreshing the page and updating retool.



out of curiosity, have you tried wrapping utils.downloadPage(pdfName, { componentsToExclude: ["tabs1" ,"button1"] }); in a try/catch? maybe try await utils.downloadPage() incase the promise is being canceled somewhere by retool?

Hey, yeah i just tried both those things you mentioned and I'm still having the same issue. it says it downloads successfully but it doesnt download the entire page. Not sure if retool made any updates

Hey @Marcos_Garcia, just tried using utils.downloadPage on a few apps and it seems to be working properly. Are you still facing this partially generated PDF issue? If so, mind sharing an app export so I can try and reproduce this for our team? Thanks!

hi @joeBumbaca , yes it started working randomly about a week ago. not sure what the issue may have been lol.

1 Like

Thanks @Marcos_Garcia! I'll unlist for now, but please ping me here if you notice it again.