mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	Ensure QR codes have a border large enough (#235)
* Ensure QR codes have a border large enough (The QR code spec requires a border at least 4*box_size thick but we can't just set border=16 because that results in a QR code more than 255px tall and I'm not yet ready to use fullimage() as a backend for it) This fix was originally commited by Stephan Sokolow on 2014-05-22 * Let the user print stuff using qr example * fix tests
This commit is contained in:
		
				
					committed by
					
						
						Patrick Kanzler
					
				
			
			
				
	
			
			
			
						parent
						
							89dfb6cf86
						
					
				
				
					commit
					5bd6dcf471
				
			@@ -211,7 +211,10 @@ class Escpos(object):
 | 
			
		||||
            qr_img = qr_code.make_image()
 | 
			
		||||
            im = qr_img._img.convert("RGB")
 | 
			
		||||
            # Convert the RGB image in printable image
 | 
			
		||||
            self.text('\n')
 | 
			
		||||
            self.image(im)
 | 
			
		||||
            self.text('\n')
 | 
			
		||||
            self.text('\n')
 | 
			
		||||
            return
 | 
			
		||||
        # Native 2D code printing
 | 
			
		||||
        cn = b'1'  # Code type for QR code
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user