我很难显示传递 pdf 文件的打印模式。
setTimeout(() => {
printJS({
printable: '53544.pdf',
type: 'pdf',
showModal: true,
fallbackPrintable: () => console.log("FallbackPrintable"),
onPrintDialogClose: () => console.log('The print dialog was closed'),
onIncompatibleBrowser: () => console.log('Pdf was opened in a new tab due to an incompatible browser')
})
console.log("TimeOut Executado");
}
,3000)
它只是与pdf 文件有关,我用类似的图像进行了测试logo.png
并且它有效。我插入该参数以回调以试图找出正在发生的事情并被OnPrintDialogClose()
触发,但模态框没有显示!屏幕闪烁并显示此消息'The print dialog was closed'
。
有什么建议吗?