0

当我尝试从其中一个微服务下载 pdf 并尝试在其他窗口中显示时,我得到以下字符。

%PDF-1.5 %���� 3 0 obj <>stream x�m�=1����w<�;�V�������t��}��!��7-��B ��I�\��UZ��i�ɖ_��Ӟ��)ƛ�M7a�����F�K$��5Ǝ��?c���P�+�b��A\问:xŜ5d.V.x.KN}W2.?kG}.t.9.-. endstream endobj 1 0 obj <>/Contents 3 0 R/Type/Page/Resources<>/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]/Font<>>>/Parent 4 0 R/Rotate 90/MediaBox[0 0 49 802]>> endobj 5 0 obj [1 0 R/XYZ 0 59 0] endobj 2 0 obj <> endobj 4 0 obj <> endobj 6 0 obj <> endobj 7 0 obj <> endobj 8 0 obj <>> endobj 9 0 obj <> endobj 外部参照 0 10 0000000000 65535 f 0000000234 00000 n 0000000518 00000 n 0006000000000 n 0060000000000006000000000 0000000484 00000 n 0000000669 00000 n 0000000723 00000 n 0000000755 00000 n 0000000858 00000 n trailer <<5dd6d332be4a095e01bd89b772db2abf>]/Root 8 0 R/Size 10>> startxref 1025 %%EOF

我相信在设置内容类型时有些错误。请为此提供解决方案。

Rh.one('<asdf/sdf/sd/myapi/>').post('',reportsParameters)
      .then(function (response) {
          var winPrint=$window.open('','_blank');
          winPrint.document.write(response);
          winPrint.document.title = $scope.reportPostParamters.fileName;
}
4

0 回答 0