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

Update convert.js to fix incorrect handling of some images #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ilyapashuk
Copy link

this script uses the "latex_styled" response field to extract the output. but for some images the "latex_styled" field is not return, only the "text" is returned for such images it fails with the "could not write to destination path" error (with the incorrect error message).

this commit fixes this by using the "text" field if the "latex_styled" field is not available.

example of the failing image is attached (check with ocr api mode, not with snip mode)
for this image, only the text field is return, latex_styled is not.

cont2ex

this script uses the "latex_styled" response field to extract the output.
but for some images the "latex_styled" field is not return, only the "text" is returned
for such images it fails with the "could not write to destination path" error  (with the incorrect error message).

this commit fixes this by using the "text" field if the "latex_styled" field is not available.
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

Successfully merging this pull request may close these issues.

None yet

1 participant