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

Image from iframe #841

Closed
enemali opened this issue Oct 13, 2023 · 1 comment
Closed

Image from iframe #841

enemali opened this issue Oct 13, 2023 · 1 comment

Comments

@enemali
Copy link

enemali commented Oct 13, 2023

Does it work if the image is coming from an iframe ? ( different domain from parent page )

@Balearica
Copy link
Collaborator

This is more a general question about HTML/iframes than Tesseract.js, as the answer comes down to whether you can access the contents of an image (img.src) in an iframe. If you can access img.src from the context where Tesseract.js is loaded, then Tesseract.js can recognize it.

I would expect the answer is no. My understanding of iframes is that if you embed an iframe that is (1) a different domain and (2) not a website you control (so you cannot set the CORS policy), then you do not have access to the contents of the iframe. In this situation, I believe the iframe is almost like a separate browser tab.

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

2 participants