<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : Text lines assembling in VB6</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : Sample Code : Text lines assembling in VB6]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 11 May 2026 22:15:36 +0000</pubDate>
  <lastBuildDate>Sat, 27 Nov 2010 11:41:06 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=1656</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[Text lines assembling in VB6 : Thanks guys. Cheers,  ]]></title>
   <link>http://www.quickpdf.org/forum/text-lines-assembling-in-vb6_topic1656_post7268.html#7268</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=987">alinux</a><br /><strong>Subject:</strong> 1656<br /><strong>Posted:</strong> 27 Nov 10 at 11:41AM<br /><br />Thanks guys. <br><br>Cheers,<br>]]>
   </description>
   <pubDate>Sat, 27 Nov 2010 11:41:06 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/text-lines-assembling-in-vb6_topic1656_post7268.html#7268</guid>
  </item> 
  <item>
   <title><![CDATA[Text lines assembling in VB6 : Great job. ]]></title>
   <link>http://www.quickpdf.org/forum/text-lines-assembling-in-vb6_topic1656_post7267.html#7267</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1000">Rowan</a><br /><strong>Subject:</strong> 1656<br /><strong>Posted:</strong> 27 Nov 10 at 9:20AM<br /><br />Great job.]]>
   </description>
   <pubDate>Sat, 27 Nov 2010 09:20:36 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/text-lines-assembling-in-vb6_topic1656_post7267.html#7267</guid>
  </item> 
  <item>
   <title><![CDATA[Text lines assembling in VB6 : Hi Alinux!Thanks for this.I think...]]></title>
   <link>http://www.quickpdf.org/forum/text-lines-assembling-in-vb6_topic1656_post7266.html#7266</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 1656<br /><strong>Posted:</strong> 26 Nov 10 at 8:13PM<br /><br />Hi Alinux!<br><br>Thanks for this.<br>I think here are many users looking for this option in QuickPDF.<br>Your sample could be a starting point for options like "keep<br>the original layout in txt, too"...<br>Thanks for sharing with us!<br><br>Cheers, Ingo<br>]]>
   </description>
   <pubDate>Fri, 26 Nov 2010 20:13:42 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/text-lines-assembling-in-vb6_topic1656_post7266.html#7266</guid>
  </item> 
  <item>
   <title><![CDATA[Text lines assembling in VB6 : It&amp;#039;s a basic sample of text...]]></title>
   <link>http://www.quickpdf.org/forum/text-lines-assembling-in-vb6_topic1656_post7264.html#7264</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=987">alinux</a><br /><strong>Subject:</strong> 1656<br /><strong>Posted:</strong> 26 Nov 10 at 7:40PM<br /><br />It's a basic sample of text lines assembling&nbsp; from GetPageText(4) function result; the results depend on quality of scan &amp; OCR process.<br>In the case of tables, the OCR engine may detect, "read" &amp; process the tables by line or by column independent of you so you'll need a sort array function for sorting the page lines array by y coordinate of each line.<br><br><br>Private Function full_lines(get_page_text As String) As String<br><br><font color="#009933">'page text lines array (0,N) - y1 or y2 word coordinate, (1,N) - line words </font><br>Dim dmp_pge() As String<br><br>ReDim dmp_pge(1, 0)<br><br><font color="#009933">'page words array</font><br>dmp_lns = Split(get_page_text, vbCrLf)<br><br>For i = 0 To UBound(dmp_lns)<br>&nbsp;&nbsp;&nbsp; If dmp_lns(i) &lt;&gt; "" Then<br><br>&nbsp;&nbsp;&nbsp; 'word line array<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dmp_wrd = Split(dmp_lns(i), ",")<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flag_exist = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For j = UBound(dmp_pge, 2) To 0 Step -1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If dmp_wrd(4) = dmp_pge(0, j) Then<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#009933">'add next word in the same line</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If dmp_pge(1, j) &lt;&gt; "" Then dmp_pge(1, j) = dmp_pge(1, j) &amp; " " &amp; dmp_wrd(UBound(dmp_wrd)) Else dmp_pge(1, j) = dmp_wrd(UBound(dmp_wrd))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flag_exist = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit For<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DoEvents<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not flag_exist Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If dmp_pge(1, UBound(dmp_pge, 2)) &lt;&gt; "" Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReDim Preserve dmp_pge(1, UBound(dmp_pge, 2) + 1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; <font color="#009933">'add y1 word(line) coordinate &amp; first word of the new line</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dmp_pge(0, UBound(dmp_pge, 2)) = dmp_wrd(4)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dmp_pge(1, UBound(dmp_pge, 2)) = dmp_wrd(UBound(dmp_wrd))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; DoEvents<br>Next<br><br>'need sort array function in the case of tables (the OCR engine may identify &amp; "read" the table by column so you must sort the lines array by the y coordinate - see dmp_pge definition)<br>'sort_array dmp_pge<br><br>For i = 0 To UBound(dmp_pge, 2)<br>&nbsp;&nbsp;&nbsp; If full_lines = "" Then full_lines = dmp_pge(1, i) Else full_lines = full_lines &amp; vbCrLf &amp; dmp_pge(1, i)<br>&nbsp;&nbsp;&nbsp; DoEvents<br>Next<br>full_lines = Replace(full_lines, """", "")<br><br>End Function<br>]]>
   </description>
   <pubDate>Fri, 26 Nov 2010 19:40:47 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/text-lines-assembling-in-vb6_topic1656_post7264.html#7264</guid>
  </item> 
 </channel>
</rss>