使用NG2-PDFJS-Viewer从S3签名的URL以在Angular中显示PDF
成功地从S3接收签名的URL,并使用NG2-PDF观看器PDF正在显示,但是使用NG2-PDFJS-Viewer具有额外功能无法正常工作。
使用ng2-pdf-ciewer,src属性可以按预期工作,
我的问题是,ng2-pdfjs-viewer上的pdfsrc属性正在管理我的签名URL并切割字符串,然后在视图中不显示任何
<pdf-viewer id="to-print" src="{{pdfSrc}}" style="height: 500px; width: 1000px;"></pdf-viewer>
<ng2-pdfjs-viewer [pdfSrc]="pdfSrc" style="height: 500px; width: 1000px;"></ng2-pdfjs-viewer>
想法的任何想法,为什么第二个变化在视图中不显示任何想法。 PDFSRC URL提供了吗?
使用NG2-PDFJS-Viewer版本6.0.2和13.2.2
Angular 11.0.5和13.0.3
测试。
Succesfully receiving a signed URL from S3, and using the ng2-pdf-viewer the pdf is displaying, however using ng2-pdfjs-viewer with the extra features does not work as expected.
with ng2-pdf-viewer the src attribute works as expected
my issue is that the pdfSrc attribute on ng2-pdfjs-viewer is maniuplating my signed url and cutting the string and then not displaying anything in the view
<pdf-viewer id="to-print" src="{{pdfSrc}}" style="height: 500px; width: 1000px;"></pdf-viewer>
<ng2-pdfjs-viewer [pdfSrc]="pdfSrc" style="height: 500px; width: 1000px;"></ng2-pdfjs-viewer>
any ideas why the second one is changing the pdfSrc url provided to it?
tested with ng2-pdfjs-viewer versions 6.0.2 and 13.2.2
angular 11.0.5 and 13.0.3
thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
https://github.com/intbot/ng2-pdfjs-viewer/issues/ 8 没关系的家伙找到了答案!在URL上运行Encodeuricomponent(URL)
https://github.com/intbot/ng2-pdfjs-viewer/issues/8 never mind guys found the answer ! run encodeURIComponent(url) on the url