在新标签中打开外部链接到PDF的外部链接
我正在尝试在新标签中打开一个链接(从Blazor Server应用程序)到PDF,但没有成功。 PDF没有下载,也不知道为什么...应该那么简单。
尝试不同的解决方案。这是用于JSRuntime解决方案的代码。另一个是一个简单的“ a”标签链接
await JSRuntime.InvokeAsync<object>("open", url, "_blank");
打开一个简单的链接,但打开下载pdf的链接。 它是带有参数“格式= PDF”的ReportingServices服务器的链接。
链接如下: myServerurl/deventerver/pages/reportViewer.aspx?%2FReportTools%2FMyReportName&amp; rs:format = pdf = pdf
我看到人们对PDF有同样的问题。 在新标签中打开PDF-Blazor
有人知道我在做什么错还是有解决方案?
I'm trying to open a link (from a Blazor server app) to a pdf in a new tab but with no success.
The pdf isn't downloading and don't know why...is should be that simple.
Tryied different solutions. This is the code used for jsruntime solution. The other is a simple "a" tag link
await JSRuntime.InvokeAsync<object>("open", url, "_blank");
Opening a simple link is working but opening a link that downloads a pdf isn't.
It's a link to a ReportingServices server with the parameter "Format=PDF".
The link is as follows:
myserverURL/ReportServer/Pages/ReportViewer.aspx?%2fReportTools%2fMYREPORTNAME&rs:Format=PDF
I've saw that people are having same issue with pdfs.
Open PDF in new Tab - Blazor
Does anyone know what I'm doing wrong or have a solution to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论