mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	Handle cases when fullCut or partCut not available
This commit is contained in:
		
				
					committed by
					
						
						Patrick Kanzler
					
				
			
			
				
	
			
			
			
						parent
						
							0f33d68f3a
						
					
				
				
					commit
					29cc8baab7
				
			@@ -578,9 +578,11 @@ class Escpos(object):
 | 
			
		||||
        # Fix the size between last line and cut
 | 
			
		||||
        # TODO: handle this with a line feed
 | 
			
		||||
        self._raw(b"\n\n\n\n\n\n")
 | 
			
		||||
        if mode.upper() == "PART":
 | 
			
		||||
 | 
			
		||||
        if mode.upper() == "PART" and self.profile.supports('paperPartCut'):
 | 
			
		||||
            self._raw(PAPER_PART_CUT)
 | 
			
		||||
        else:  # DEFAULT MODE: FULL CUT
 | 
			
		||||
        elif mode.upper() != "PART" and self.profile.supports('paperFullCut'):
 | 
			
		||||
            # DEFAULT MODE: FULL CUT
 | 
			
		||||
            self._raw(PAPER_FULL_CUT)
 | 
			
		||||
 | 
			
		||||
    def cashdraw(self, pin):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user