我需要显示 s3 签名 url 作为文件对象返回的 pdf。我正在尝试使用 ng2-pdfjs-viewer 来显示。但这似乎不起作用。
我尝试直接使用 s3 url 到 pdfSrc 但它不起作用。
组件.html:
<ng2-pdfjs-viewer pdfSrc="pdfUrl"></ng2-pdfjs-viewer>
Run Code Online (Sandbox Code Playgroud)
组件.ts
previewProtocol(){
//this.spinner.show();
this.service.getS3Url(deviceType).subscribe((response) => {
$('#BSModal').modal("show");
console.log(response);
this.pdfUrl = response;
},
(err)=> {
});
Run Code Online (Sandbox Code Playgroud)
}