Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not have support for windows? #2

Closed
ghost opened this issue Nov 30, 2021 · 1 comment
Closed

Does not have support for windows? #2

ghost opened this issue Nov 30, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 30, 2021

Hi, first of all the library is really good.

I tried to run this library on windows 10 and it doesn't work. I believe I did everything right, installed Tesseract and ran the following code:

from multilingual_pdf2text.pdf2text import PDF2Text
from multilingual_pdf2text.models.document_model.document import Document
import logging

from utils import write_txt

logging.basicConfig(level=logging.INFO)


def main():
    ## create document for extraction with configurations
    pdf_document = Document(document_path="./pdfs_samples/page1.pdf", language="por")
    pdf2text = PDF2Text(document=pdf_document)
    content = pdf2text.extract()
    for page in content:
        print(page["text"])
        write_txt(page["text"], filename="output_multilingual_pdf2text1.txt")


if __name__ == "__main__":
    main()

I ran this same code on linux(ubuntu 20.04) and it worked perfectly. So, was wondering if the library doesn't support windows?

@shahrukhx01
Copy link
Owner

@richecr As long as you are able to install Tessaract on Windows this library would work fine. You can take a look at this article Installing and using Tesseract 4 on windows 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant