mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Fixing error sentinel for pdftotext when the PDF has no text (scanned images). It was causing a crash previously.
This commit is contained in:
		@@ -235,6 +235,6 @@ def get_text_from_pdf(pdf_file):
 | 
				
			|||||||
        try:
 | 
					        try:
 | 
				
			||||||
            pdf = pdftotext.PDF(f)
 | 
					            pdf = pdftotext.PDF(f)
 | 
				
			||||||
        except pdftotext.Error:
 | 
					        except pdftotext.Error:
 | 
				
			||||||
            return False
 | 
					            return ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return "\n".join(pdf)
 | 
					    return "\n".join(pdf)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user