Question about PDF display/download on the Freshworks CRM application

Hello, I have a question about a feature we wish to use on freshwork CRM.

For a requirement with a client, we need to be able to either display a DevExpress report or allow it to be downloaded as a PDF, the last few days i have been testing with the custom integrations option, i made a simple integration to read data from freshworks (that we’ll need to know what information to add to the report), and wanted to either display or allow the download of an external PDF. After testing, i couldn’t find a way to make either of these options work, i tried a couple libraries and the Embed element to try to display it, but neither worked, while a library that allowed the download and a Link with the download option didn’t work either, i also tested IFrames to try to display a different page with a PDF, but found no success. From the information returned by the errors, it seems like freshworks and the browser are blocking the connexion to the external site that hosts the PDF that i tried to display, i’m guessing this behavior is for security reasons. Is there a work around or a specific method to make either of these options work?

To reiterate what we need to do: We need to either display or allow the download of a PDF that is hosted on an external site from Freshworks on the Freshworks CRM account page by a custom integration, and since the PDF has a very specific format, making it directly on the implementation is not a viable option.

I have a similar custom app which fetches a .pdf in base64 from an external API using the Request API and a Freshworks / Freshdesk field (Request API) (This wil also work in Freshworks CRM).

After that just make a clickable button with the data from the response. Something like this:

                                  var a = document.createElement('a');
                                  a.href = 'data:' + mimetype + ';base64,' + filedata;
                                  a.download = filename;
                                  a.click();
3 Likes

hey @Jaime_Cisneros,

Welcome to the Freshworks Developer community :grinning:

do you think the suggestion by @Joris_Schuurkes will work for you?

Stay Safe :slight_smile:

1 Like

Yes, that seems like it should work, thank you very much!

1 Like

Hey @Joris_Schuurkes

Welcome to the Freshworks Developer community :smiley:

congrats on your first accepted solution, your contribution to the Freshworks community is much appreciated and valued!

Stay Safe :slight_smile:

2 Likes