|
@@ -38,14 +38,17 @@ export const JGPrint = function (data, type, printerType) {
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
// 喷墨打印
|
|
// 喷墨打印
|
|
- const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
|
|
|
|
- document.getElementById('print').innerHTML = '<iframe id="printfsqd" name="printfsqd" src="' + url + '" hidden></iframe>'
|
|
|
|
|
|
+ // const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
|
|
|
|
+ // document.getElementById('print').innerHTML = '<iframe id="printfsqd" name="printfsqd" src="' + url + '" hidden></iframe>'
|
|
if (type == 'preview') { // 预览
|
|
if (type == 'preview') { // 预览
|
|
// window.open(url)
|
|
// window.open(url)
|
|
|
|
+ console.log(data.data)
|
|
const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
|
|
const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
|
|
- LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data)
|
|
|
|
|
|
+ LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) // 隐藏底图上有模拟走纸板的条纹线
|
|
LODOP.SET_PRINT_STYLEA(0, 'PDFScalMode', 1)
|
|
LODOP.SET_PRINT_STYLEA(0, 'PDFScalMode', 1)
|
|
- LODOP.SET_PRINT_PAGESIZE(3, 0, 0, '')
|
|
|
|
|
|
+ LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data)
|
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(3, 2090, 0, '')
|
|
|
|
+ LODOP.PREVIEW()
|
|
} else if (type == 'print') { // 打印
|
|
} else if (type == 'print') { // 打印
|
|
window.frames['printfsqd'].focus()
|
|
window.frames['printfsqd'].focus()
|
|
window.frames['printfsqd'].print()
|
|
window.frames['printfsqd'].print()
|