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

PDF creation not working #430

Open
elpendor opened this issue Jul 28, 2021 · 0 comments
Open

PDF creation not working #430

elpendor opened this issue Jul 28, 2021 · 0 comments

Comments

@elpendor
Copy link

elpendor commented Jul 28, 2021

Hi, I'm having some problems generating a PDF with the library.

When I call recognizedPDFForImages I get:

Error in fopenWriteStream: stream not opened
Error in pixWrite: stream not opened
Error in fopenReadStream: file not found
Error in extractG4DataFromFile: stream not opened to file
Error in l_generateG4Data: datacomp not extracted
Error in pixGenerateCIData: g4 data not made

This seems to be coming from the line:

result = _tesseract->ProcessPage(pix, page, pagename, NULL, 0, renderer);

I understand this is originating from Leptonica and not Tesseract but I'm having some trouble figuring it out. I guess its related to reading/writing the output file, maybe? Seems to be be reading the input image fine.

Regular OCR using recognizedText seems to be working just fine.

Tried several images (the one from the repo included), tried both jpg and png. Same result.
Also pdf.ttf is inside tessdata folder (just in case, even though it shouldn't be necessary).

I'm running the exact code from the tests, and the app is targeting 14.0, if it's of any help.

Any ideas?

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