hey iris72, printing from js can be tricky. window.print() works for whole pages, but for receipts you might need a thermal printer with special drivers. check out libraries like qz tray or jsprint. they can help with custom printing. good luck with ur project!
JavaScript printing capabilities are indeed limited for security reasons. However, you have options for your receipt printing project. One approach is to generate a printable version of the receipt as a separate webpage, then use window.print() to trigger the print dialog. For faster, custom printing, consider integrating a receipt printer API like Star Micronics’ or Epson’s. These often require additional software installed on the client machine. Alternatively, you could explore server-side printing solutions where the print job is sent to a dedicated print server. This method can offer more control and speed, especially for high-volume printing needs.
ooh, printing from javascript sounds interesting! have u looked into the window.print() method? it might work for basic stuff. but for custom receipts, maybe u need a special printer API? im curious, whats ur project about? sounds cool! any chance u could share more details?