Closed moryekram closed 7 years ago
First try to manual print this content.
jsPrintSetup
doesn't modify title.
I see that window.close()
is called immediately after jsPrintSetup.printWindow(window)
.
jsPrintSetup.printWindow(window) is executed asynchronously. This mean that execution of script continue after calling of method jsPrintSetup.printWindow(window) while printing may be in progress which can result in problems.
The simplest way to workaroud is to call window.close()
after timeout.
Because "/" is not valid in file name in windows I remove it from my code and print it manually.my MicrosoftPrintToPDF printer change title to file path.But with jsPrintSetup title is not correct.please check this file. u21124iy.txt Thanks
jsPrintSetup
doesn't modify title implicitly. Only when you use jsPrintSetup.setOption('title', 'Some title')
.
You can try following:
jsPrintSetup.setOption('title', 'Some title')
btw. Can you post not minified code.
Hello again.I try your suggestion but title is incorrect. here this is my file ob02auns.txt
I have made some corrections to your example.
headerStrCenter
for testing
For me this example is working.this is result for me.
I think that this is problem of 'Microsoft Print To PDF' driver.
I have tested with 'PDF Creator' and title is displayed correct.
OK,thanks.I test it.
Hello. I have html file that has utf-8 title. when i print using jsPrintSetup title is not valid. title should be "نامه شماره ۴۵۴/11" Please help me.Thanks. u21124iy.txt