Open KaranLala opened 2 weeks ago
Can you please provide a manifest or some source code to show what you are trying to do?
sure, here is a codesandbox: https://codesandbox.io/p/sandbox/react-pdf-sample-3tnwyh?file=%2Fsrc%2FApp.js%3A14%2C5
This codesandbox doesn't work properly on Chrome / Brave. It works fine on Firefox.
If you run the same code on your local machine it should work correctly. This is an example of something that I expected to work in an Excel taskpane. The PDFViewer component is just creating a blob and embedding it in an iframe with the help of URL.createObjectURL({blob})
Provide required information needed to triage your issue
Unable to load a PDF in an embedded iframe in the taskpane when using a blob url created using URL.createObjectURL. PDFs hosted online work fine.
Your Environment
Expected behavior
The iframe should load the PDF
Current behavior
The iframe document does not load, it is set to about:blank. Opening the URL in a new tab renders the PDF correctly
Steps to reproduce
Context
I am trying to create a Excel to PDF templating system. The user should be able to add content to an excel sheet and generate a PDF based on content on that page.