如何使用Angular 7将数组缓冲区响应转换为PDF 这是我的代码
const body = new FormData();
body.append('clientApp', 'BUI');
body.append('projectName', this.ProjectName);
body.append('repoPath', this.RepoPath);
this.http.post(environment.GetPreview + this.SiteID + '&tango_ticket=' + this.TangoToken, body, { responseType: 'arraybuffer' } ).subscribe(res => {
console.log(res);
});
我得到的回应
答案 0 :(得分:0)
步骤1 npm安装文件保护程序--save 步骤2
this.http.post(environment.GetPreview + this.SiteID + '&tango_ticket=' + this.TangoToken, body, { responseType: 'arraybuffer' } ).subscribe(res => {
saveAs(res, 'response.pdf');
});