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

[FEATURE] Need a way to specify position of a word #518

Open
sagar-kalburgi-ripcord opened this issue Jun 12, 2023 · 2 comments
Open

[FEATURE] Need a way to specify position of a word #518

sagar-kalburgi-ripcord opened this issue Jun 12, 2023 · 2 comments

Comments

@sagar-kalburgi-ripcord
Copy link

Is your feature request related to a problem? Please describe.
I am trying to utilize the JSON response from Google Vision OCR API to create a searchable PDF. The JSON response consists of the details of the text layout. I used the unipdf Go library to add the image of a scanned text document to a PDF file, and then tried to overlay the text contained in the JSON response on top of it. Unipdf Go library does provide a way to specify the position of a paragraph, but it does not provide a way to specify the position of each word as specified in the text layout. There is this function but it does not allow to specify the coordinates of the word (text chunk).

Describe the solution you'd like
Library function to specify the position of a word

Describe alternatives you've considered
I did try to consider each word as a paragraph to position it via coordinates using the function https://apidocs.unidoc.io/unipdf/v3.39.0/github.com/unidoc/unipdf/v3/creator/#StyledParagraph.SetPos
but its not getting rendered properly, moreover it is semantically wrong.

@github-actions
Copy link

Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized, other issues go into our backlog where they are assessed and fitted into the roadmap when suitable. If you need to get this done, consider buying a license which also enables you to use it in your commercial products. More information can be found on https://unidoc.io/

@sampila
Copy link
Collaborator

sampila commented Jun 12, 2023

Hi @sagar-kalburgi-ripcord,

Could you share runnable code snippet for us to reproduce the issue on our end?

Best regards,
Alip

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