'Add logo with text while printing receipt in Java
So far, I am able to print the receipt, but couldn't find a way to add logo in the final print.
Here's my Code:
public static void printcard(final String bill) throws FileNotFoundException,PrinterException {
JTextPane textPane = new JTextPane();
textPane.setText(bill);
textPane.print();
FileOutputStream stream = new FileOutputStream(bill);
PrintWriter prin = new PrintWriter(bill);
//the following line writes to the printer
prin.println(bill);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
