在dataURL上使用Javascript window.open时,能否在查看器中设置PDF文件的名称和/或在Chrome中设置URL?

时间:2018-07-31 21:17:51

标签: javascript google-chrome

PDF Viewer File Name/Title

New Tab URL

打开该标签的我的代码(Javascript)如下:

function openPdfInNewTab(pdfData) {
  var file = new Blob([pdfData], { type: 'application/pdf' })
  var fileURL = URL.createObjectURL(file)
  window.open(fileURL, 'test')
}

0 个答案:

没有答案