OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Draw lines between several points with known coordinates

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Guest
My task: to connect points with lines using known coordinates.

What I have already done: using the doctr library, I find the coordinates of the words I am interested in on a pdf file. (My python code is not important for this question, below I will show what data I get from a specific file)

For example, there is a pdf file in which I am looking for the word "INVOICE"

enter image description here

After doctr has run, I get the following data

((0.09370404411764705, 0.0439453125), (0.33140099789915967, 0.09765625));

((0.5925912552521009, 0.1796875), (0.6575433298319328, 0.1953125));

((0.5925912552521009, 0.2041015625), (0.6575433298319328, 0.21875));

My question: how can I draw lines between these three points? To get a figure at the output. For a better understanding of the situation for you: the figure on this file will be like a template for me. I receive a large number of documents, and in order not to look through everything, I will check whether this figure is on the received document, and look through only the necessary document.
<p>My task: to connect points with lines using known coordinates.</p>
<p>What I have already done: using the doctr library, I find the coordinates of the words I am interested in on a pdf file. (My python code is not important for this question, below I will show what data I get from a specific file)</p>
<p>For example, there is a pdf file in which I am looking for the word "INVOICE"</p>
<p><a href="https://i.sstatic.net/zOuVIWf5.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zOuVIWf5.jpg" alt="enter image description here" /></a></p>
<p>After doctr has run, I get the following data</p>
<p>((0.09370404411764705, 0.0439453125), (0.33140099789915967, 0.09765625));</p>
<p>((0.5925912552521009, 0.1796875), (0.6575433298319328, 0.1953125));</p>
<p>((0.5925912552521009, 0.2041015625), (0.6575433298319328, 0.21875));</p>
<p>My question: how can I draw lines between these three points? To get a figure at the output.
For a better understanding of the situation for you: the figure on this file will be like a template for me. I receive a large number of documents, and in order not to look through everything, I will check whether this figure is on the received document, and look through only the necessary document.</p>
 

Latest posts

B
Replies
0
Views
1
Blundering Ecologist
B
Top