Quote from
luishp on April 4, 2020, 4:46 pm
As far as I know, the only way to send information to the local printer in a pure Web App is printing the whole interface using:
BeginJS
window.print();
EndJS
So, if you want to print, let's say the content within a container "Container1", you can use something like this:
BeginJS
var printContents = $('#Container1').html();
w = window.open();
w.document.write(printContents);
w.document.close();
w.focus();
w.print();
w.close();
EndJS
This will copy the content into a new window or tab and print it.
If you are deploying to PhoneGap or NWjs, there will be probably additonal options using specific plugins or JavaScript APIs.
As far as I know, the only way to send information to the local printer in a pure Web App is printing the whole interface using:
BeginJS
window.print();
EndJS
So, if you want to print, let's say the content within a container "Container1", you can use something like this:
BeginJS
var printContents = $('#Container1').html();
w = window.open();
w.document.write(printContents);
w.document.close();
w.focus();
w.print();
w.close();
EndJS
This will copy the content into a new window or tab and print it.
If you are deploying to PhoneGap or NWjs, there will be probably additonal options using specific plugins or JavaScript APIs.