Skip to content

How to display pdf using iframe in Microsoft Teams

I have a C# pdf comparison app hosted on azure and i just want to display the compared pdf in iframe. This is working fine in a browser but when i am integrating it to teams the compared pdf is not showing in iframe. After clicking on compare button the output pdf is downloaded automatically but nothing is being display in iframe.enter image description here

This is the block of code which i am using for embedding:

success: function (Data) {
                    if (Data) {
                        var embed1 = document.getElementById('outputPdf');
                        embed1.src = "../../PythonFile/OutputPdf/" + Data;
                        $("#outputPdf").css("display", "block");
<iframe id="outputPdf" type="application/pdf" style="display:none;width:100%" height="600"></iframe>


@Asif Hussain: In Microsoft Teams, we have only be able to download the PDF file in “Files”. It’s not possible to precise the download file name or the download file location. The use of PDF’s needs to be improved with Microsoft Teams. There is no official solution – we have been waiting for one for a while. As workarounds, you could always look at using the Third Party Adobe applications, or if a PDF (s) is hosted on a site, look to use a web page tab and see if the ability to manipulate on the site pulls through.