MicrosoftEdge / MicrosoftEdge/WebView2Feedback
Open a local PDF in an UWP application (HoloLens)
Open
Nobody has claimed this yet.
bug
tracked
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
I want to open a PDF file that is stored in the Application.persistentDataPath. This works inside the Unity Editor, but on the HoloLens I see this:
public void LoadPdf(string file)
{
var _webView = GetComponent< WebView >();
_webView.GetWebViewWhenReady((IWebView webView) =>
{
webView.Load(new Uri(FileToUrl(file));
});
}
private string FileToUrl(string pdfFile)
=> ("file://" + Application.persistentDataPath + "/" + pdfFile).Replace(" ", "%20");
Is there a different way to format the uri to a locally stored PDF or can I somehow change the restrictions of the WebView, to display PDFs from the local file system?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.