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

Can't get coordinates. #64

Open
Aleksandern opened this issue Feb 26, 2018 · 0 comments
Open

Can't get coordinates. #64

Aleksandern opened this issue Feb 26, 2018 · 0 comments

Comments

@Aleksandern
Copy link

Hello
I can't get coordinates for my text "green-color-2-2-2". My Script returns "Red green-color-2-2-2"

import pdfquery
import sys
sys.setrecursionlimit(2000)
pdfpath = sys.argv[1]
inputstr = sys.argv[2]
page = int(sys.argv[3])
pdf = pdfquery.PDFQuery(pdfpath)
pdf.load(page)
label = pdf.pq('LTTextLineHorizontal:contains("'+inputstr+'")')[0].layout
print(label)

response

<LTTextLineHorizontal 167.320,142.577,244.579,157.770 u'Red green-color-2-2-2\n'>

foxitphantompdf_2018-02-26_17-14-48

How to get the text I need?

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