Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel Taskpane Add-in Iframe Unable to load blob URLs #4421

Open
KaranLala opened this issue May 4, 2024 · 2 comments
Open

Excel Taskpane Add-in Iframe Unable to load blob URLs #4421

KaranLala opened this issue May 4, 2024 · 2 comments
Assignees
Labels
Area: Excel Issue related to Excel add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback

Comments

@KaranLala
Copy link

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

  • Platform [PC desktop, Mac, iOS, Office on the web]: Desktop
  • Host [Excel, Word, PowerPoint, etc.]: Excel
  • Office version number: Office 365 v2403
  • Operating System: Win11
  • Browser (if using Office on the web): ______

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

  1. Can use react pdf to create a blob or use the react pdf PDFviewer

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.

@m-hellesen
Copy link
Collaborator

Can you please provide a manifest or some source code to show what you are trying to do?

@KaranLala
Copy link
Author

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})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Excel Issue related to Excel add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback
Projects
None yet
Development

No branches or pull requests

4 participants