<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 30, 2012 at 12:50 AM, Albert Astals Cid <span dir="ltr"><<a href="mailto:aacid@kde.org" target="_blank">aacid@kde.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">El Diumenge, 30 de desembre de 2012, a les 00:30:41, Jaydeep Solanki va<br>
escriure:<br>
</div><div class="im">> I'm aware about Textpage algorithms that regardless of the generator, makes<br>
> text selection work properly in column layout.<br>
> I'm not asking it for okular, I'm asking for personal use, as I was trying<br>
> out Poppler, I made a small app that currently can open pdf files, while I<br>
> was working on the text selection in column layout, I thought that if all<br>
> the libs generate text in the correct order then there is no need for<br>
> coding the algorithm to arrange text. In future I'm planning to add support<br>
> for other formats, so I need to know if the algorithm is needed.<br>
<br>
</div>The thing is, why write the column sorting algorithm in each and every of the<br>
libraries if you can have it just in one place?<br> <br></blockquote><div><br></div><div>yes you are absolutely correct, but I was thinking to omit the algorithm completely. Because if all the libs generate text in proper order then that can be used for helping the selection, instead of an algorithm. <br>
</div><div>I have found that OCRopus is used in Okular, I didn't confirm, but found it somewhere written on internet. (correct me if I'm wrong).<br></div><div>OCRopus uses image processing which uses a large amount of computation resources.<br>
</div><div>So the core reason to omit the algorithm is to save large computation.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers,<br>
  Albert<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Jaydeep<br>
><br>
> On Sat, Dec 29, 2012 at 11:22 PM, Albert Astals Cid <<a href="mailto:aacid@kde.org">aacid@kde.org</a>> wrote:<br>
> > El Dissabte, 29 de desembre de 2012, a les 22:56:12, Jaydeep Solanki va<br>
> ><br>
> > escriure:<br>
> > > As you might be knowing that Poppler::Page::textList() generates text in<br>
> > > the correct order (i.e. left to right). Now poppler not only generates<br>
> > > it<br>
> > > in the correct order but it also considers the layout, for example in a<br>
> ><br>
> > two<br>
> ><br>
> > > column document, it follows the column layout while indexing the text.<br>
> > > [image: Inline image 2]<br>
> > ><br>
> > > just of example consider the image above, see the selection, poppler<br>
> > > doesn't generate textList() in that order, it generates the textList()<br>
> > > as<br>
> > > shown in the below image,<br>
> > ><br>
> > > [image: Inline image 3]<br>
> > > So my question is do all the libraries that the generators of okular<br>
> > > use,<br>
> > > generate text in the proper order considering the layout ?<br>
> ><br>
> > That doesn't matter, Textpage algorithms "should" correctly arrange text<br>
> > in<br>
> > columns (as correctly as the algorithm in there works).<br>
> ><br>
> > Have you found any particular problem?<br>
> ><br>
> > Albert<br>
> > _______________________________________________<br>
> > Okular-devel mailing list<br>
> > <a href="mailto:Okular-devel@kde.org">Okular-devel@kde.org</a><br>
> > <a href="https://mail.kde.org/mailman/listinfo/okular-devel" target="_blank">https://mail.kde.org/mailman/listinfo/okular-devel</a><br>
_______________________________________________<br>
Okular-devel mailing list<br>
<a href="mailto:Okular-devel@kde.org">Okular-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/okular-devel" target="_blank">https://mail.kde.org/mailman/listinfo/okular-devel</a><br>
</div></div></blockquote></div><br></div></div>