尝试在HTML中加载PDF文件时遇到问题

尝试在HTML中加载PDF文件时遇到问题,html,angular,pdf,typescript,web-frontend,Html,Angular,Pdf,Typescript,Web Frontend,我在试图查看html页面中的pdf文件时遇到问题。以下是检索文件的角度代码: 服务: recoverDocument(id:Number):可观察{ 返回此文件。http .get(`url`,{responseType:ResponseContentType.Blob}) .map(response=>response.blob()); }如果添加一些链接,会发生什么 <object width="400" height="400" data="http://youserver.com

我在试图查看html页面中的pdf文件时遇到问题。以下是检索文件的角度代码:

服务:

recoverDocument(id:Number):可观察{
返回此文件。http
.get(`url`,{responseType:ResponseContentType.Blob})
.map(response=>response.blob());

}
如果添加一些链接,会发生什么

<object width="400" height="400" data="http://youserver.com/report.pdf"></object>

Pdf已打开或您看到承诺错误

这个.documentPDF变量中有哪些数据