django_ocr_server/models.py
def can_create_pdf(self):
        """
        This function return True if it is possible to create searchable PDF 2019-03-24
        :return: boolean True if it is possible to create searchable PDF
        """
        self.is_saved()  # checking that instance of OCRedFile is saved, raise DoesNotSaved exception otherwise
        if not self.can_remove_file:
            # can not create pdf if OCRedFile.file does not exist
            return False
        if not self.ocred_pdf or 'pdf_removed' in self.ocred_pdf.name or 'store_pdf_disabled' in self.ocred_pdf.name:
            # OCRedPDF does not exits
            # or it was removed
            # or it's storing was disabled
            if (not self.is_pdf or not self.has_pdf_text) and len(self.text):
                # OCRedFile.file is an image or it is pdf without text
                # and the result of ocring is not empty
                return True
        return False

        This function return True if it is possible to create searchable PDF 2019-03-24
        :return: boolean True if it is possible to create searchable PDF
        
This function return True if it is possible to create searchable PDF 2019-03-24
This function return True if it is possible to create searchable PDF 2019 - 03 - 24
def can_create_pdf(self):
        self.is_saved()  
        if not self.can_remove_file:
            return False
        if not self.ocred_pdf or 'pdf_removed' in self.ocred_pdf.name or 'store_pdf_disabled' in self.ocred_pdf.name:
            if (not self.is_pdf or not self.has_pdf_text) and len(self.text):
                return True
        return False
def can_create_pdf ( self ) : self . is_saved ( ) if not self . can_remove_file : return False if not self . ocred_pdf or 'pdf_removed' in self . ocred_pdf . name or 'store_pdf_disabled' in self . ocred_pdf . name : if ( not self . is_pdf or not self . has_pdf_text ) and len ( self . text ) : return True return False
This function return True if it is possible to create searchable PDF 2019-03-24
This function return True if it is possible to create searchable PDF 2019 - 03 - 24
"""
        This function return True if it is possible to create searchable PDF 2019-03-24
        :return: boolean True if it is possible to create searchable PDF
        """ # checking that instance of OCRedFile is saved, raise DoesNotSaved exception otherwise # can not create pdf if OCRedFile.file does not exist # OCRedPDF does not exits # or it was removed # or it's storing was disabled # OCRedFile.file is an image or it is pdf without text # and the result of ocring is not empty
boolean True if it is possible to create searchable PDF
boolean True if it is possible to create searchable PDF
self