mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	Adjusted QR error correction
Maxed out the error correction on QR code generation for vastly improved recognition. The trade-off is that the amount of bytes that can be stored are reduced.
This commit is contained in:
		
				
					committed by
					
						
						Patrick Kanzler
					
				
			
			
				
	
			
			
			
						parent
						
							a921061b40
						
					
				
				
					commit
					1614298863
				
			@@ -205,7 +205,7 @@ class Escpos(object):
 | 
			
		||||
 | 
			
		||||
        :param text: text to generate a QR-Code from
 | 
			
		||||
        """
 | 
			
		||||
        qr_code = qrcode.QRCode(version=4, box_size=4, border=1)
 | 
			
		||||
        qr_code = qrcode.QRCode(version=4, box_size=4, border=1, error_correction=qrcode.constants.ERROR_CORRECT_H)
 | 
			
		||||
        qr_code.add_data(text)
 | 
			
		||||
        qr_code.make(fit=True)
 | 
			
		||||
        qr_img = qr_code.make_image()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user