mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			317 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			317 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| """Example for printing barcodes."""
 | |
| from escpos.printer import Usb
 | |
| 
 | |
| # Adapt to your needs
 | |
| p = Usb(0x0416, 0x5011, profile="TM-T88II")
 | |
| 
 | |
| # Print software and then hardware barcode with the same content
 | |
| p.barcode("123456", "CODE39", width=2, force_software=True)
 | |
| p.text("\n")
 | |
| p.text("\n")
 | |
| p.barcode("123456", "CODE39")
 | 
