django_ocr_server/utils.py
def pdf2text(pdf_content):
    """
    It converts pdf_content as bytes to string 2019-03-10
    :param pdf_content: a content of a pdf file as bytes
    :return: text of pdf
    """
    pdfs = pdftotext.PDF(BytesIO(pdf_content))
    pdf_text = ''
    for page in range(len(pdfs)):
        pdf_text += pdfs[page]
    return pdf_text

    It converts pdf_content as bytes to string 2019-03-10
    :param pdf_content: a content of a pdf file as bytes
    :return: text of pdf
    
It converts pdf_content as bytes to string 2019-03-10
It converts pdf_content as bytes to string 2019 - 03 - 10
def pdf2text(pdf_content):
    pdfs = pdftotext.PDF(BytesIO(pdf_content))
    pdf_text = ''
    for page in range(len(pdfs)):
        pdf_text += pdfs[page]
    return pdf_text
def pdf2text ( pdf_content ) : pdfs = pdftotext . PDF ( BytesIO ( pdf_content ) ) pdf_text = '' for page in range ( len ( pdfs ) ) : pdf_text += pdfs [ page ] return pdf_text
It converts pdf_content as bytes to string 2019-03-10
It converts pdf_content as bytes to string 2019 - 03 - 10
"""
    It converts pdf_content as bytes to string 2019-03-10
    :param pdf_content: a content of a pdf file as bytes
    :return: text of pdf
    """
text of pdf
text of pdf
pdf_content
a content of a pdf file as bytes
a content of a pdf file as bytes