<?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 : DASetTextExtractionWordGap</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 : I need help - I can help : DASetTextExtractionWordGap]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 10 Jul 2026 08:46:41 +0000</pubDate>
  <lastBuildDate>Tue, 29 May 2012 00:35:00 +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=2139</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[DASetTextExtractionWordGap : I figured out most of the ExtractFilePageContentToString....]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9669.html#9669</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 29 May 12 at 12:35AM<br /><br />I figured out most of the ExtractFilePageContentToString.&nbsp; It has to be one of your intermediate level outputs rather than raw pdf because it is amazingly easy to understand once I did a little guessing.&nbsp; Is this format used for input to your rendering code? or is it something else?&nbsp; Between it and the mode 4 text output I can create a surprisingly good rendering to a bitmap.&nbsp; (I know - you already provide that, but this gives me a way to quickly visually verify that I am interpreting the various strings correctly).&nbsp; It has been very entertaining.&nbsp; I think I can now go back to work and efficiently extract the pdf text strings that I was interested in in the first place.&nbsp; Once again, thanks for an excellent product.&nbsp; Howard<br>]]>
   </description>
   <pubDate>Tue, 29 May 2012 00:35:00 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9669.html#9669</guid>
  </item> 
  <item>
   <title><![CDATA[DASetTextExtractionWordGap : Hi Andrew - I really hate to ask,...]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9665.html#9665</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 28 May 12 at 3:36PM<br /><br />Hi Andrew - I really hate to ask, but Google searches on pdf internal structure are turning up nothing useful.&nbsp; I just need some sort of clue as to how to parse ExtractFilePageContentToString results.&nbsp; Is this pretty much the internal pdf structure, or is this more of an intermediate level of QPL processing?&nbsp; <br><br>&nbsp;It looks a lot like each line is a separate command element and the last two characters on the line are a "command".&nbsp; The rest of the line is probably decoded based on the "command"<br><br>I don't know if you recall "magic pictures" of the 1980s or 90s which are a page of various dots, and if you stare at them a certain way, you see a picture.&nbsp; That is what this seems like.&nbsp; I can almost see the structure, but not quite.<br><br>If I am on the right track, please just reply "yes".&nbsp; If you have a handy link, I would appreciate it, but this is way beyond anything you should have to spend any time on.&nbsp; I am pursuing this to keep my brain exercised - it just "feels" like something useful.<br><br>Thanks - Howard<br><br>PS. I did locate some of the strings in question and I see the difficulty in interpreting them.<br>]]>
   </description>
   <pubDate>Mon, 28 May 2012 15:36:15 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9665.html#9665</guid>
  </item> 
  <item>
   <title><![CDATA[DASetTextExtractionWordGap : Hi Andrew - thank you for the...]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9664.html#9664</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 28 May 12 at 2:10PM<br /><br />Hi Andrew - thank you for the clarifications.&nbsp; As I said, QPL already does an amazing job, so I'm really just trying to figure out why it isn't perfect.&nbsp; I do NOT have strong familiarity with the internals of pdf structure, but, what I do know makes me not want to dig deeper than I have to.<br><br>The puzzling aspect of this is that the strings like "Options 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 0&nbsp; 5&nbsp; 3 10 1" really do look like that in the Adobe and QPL rendering.&nbsp; As I said, very small font, so measuring is impractical, but the space is clearly larger than the character height, so it would really seem like a space should be imputed.&nbsp; Additionally,&nbsp; the fact that the three similar lines detect some spaces but not others is odd.&nbsp; The fact that changing the wordgap doesn't have any effect on these strings at all is odd - there is obviously more going on here.<br><br>I will play with ExtractFilePageContentToString a little more and see if I can get clues as to why there is trouble.&nbsp; If I can decode it enough to locate the strings in question, I may get some clues.<br><br>This is not a big problem to me, but it nags at me.&nbsp; These strings are not ones I really need to decode, and the other 98% of the extraction works fine.<br><br>Thanks - Howard<br>]]>
   </description>
   <pubDate>Mon, 28 May 2012 14:10:19 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9664.html#9664</guid>
  </item> 
  <item>
   <title><![CDATA[DASetTextExtractionWordGap : I gets very difficult to try and...]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9657.html#9657</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 28 May 12 at 5:55AM<br /><br />I gets very difficult to try and determine what the correct width of a space character.<div><br></div><div>Both Acrobat and Quick PDF Library have to make a best guess as many PDF's place the characters individually and leave it up to the extraction process to determine whether a gap is 0, 1 or more spaces. &nbsp;WordGap will allow you to fine tune what is defined as a space and what is not. &nbsp;The default of 0.7 has changed between versions but it actually translates to 0.105 * text height. &nbsp;So if a gap is larger than 10% of the cell height then it is considered to be a space character. &nbsp;There are some overriding factors such as if there is an implicit space defined in the output then it will be maintained. &nbsp;It is only when spaces are not drawn or when each character is draw individually that we need to rely a little more on wordgap. &nbsp;Setting word gap to 1.4 will double the allowed width of a space to 20% of character height.&nbsp;<br><br>It is not possible to get 100% accuracy on all PDF's and as mentioned QPL does a pretty good job even compared to Acrobat. &nbsp;QPL is using OCR like techniques to determine words and character spacing and so cannot be 100% correct for all PDF's.&nbsp;<br><br>Option 0 is not as exact as options 3 - 8. &nbsp;Options 3 - 8 all use the same internal logic to extract the results.</div>]]>
   </description>
   <pubDate>Mon, 28 May 2012 05:55:28 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9657.html#9657</guid>
  </item> 
  <item>
   <title><![CDATA[DASetTextExtractionWordGap : Significant test - I was able...]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9654.html#9654</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 27 May 12 at 7:02PM<br /><br />Significant test - I was able to get "to Buy" to join together in mode 4 with a wordgap setting of 0.9, instead of the default 0.7.&nbsp; I don't have fine enough ruler, but the gap on the printed page looks like about half a millimeter - extremely small, but apparantly about the difference between wordgap setting of 0.8 and 0.9.<br><br>The documentation talks about the wordgap at a ratio between the gap and the text height.&nbsp; That "feels" reasonable for this example, but it must not come into play for the single digit lines because the gap ratio is much larger in those cases.<br><br>To me, the important thing is that setting the word gap does have a (reasonable) effect on the processing.<br>]]>
   </description>
   <pubDate>Sun, 27 May 2012 19:02:57 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9654.html#9654</guid>
  </item> 
  <item>
   <title><![CDATA[DASetTextExtractionWordGap : I am decoding some pretty complex,...]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9653.html#9653</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 27 May 12 at 6:49PM<br /><br />I am decoding some pretty complex, high-density text pages.&nbsp; Library version 8.13 did a pretty good job, but not perfect, so I upgraded to 8.15 today.&nbsp; 8.15 is definitely better, but there are still some puzzling aspects to the ones that didn't come out clean.<br><br>I can't get any change in the output by using SetTextExtractionWordGap or the DA version, thinking that there might be some difference in internal processing.&nbsp; No matter what I set the wordgap to, it gives the same results.&nbsp; I see two likely interpretations.&nbsp; First would be that the processing never got to a point where it needed to examine a string based on word gap.&nbsp; The other would be that it is getting tested, but not correctly.<br><br>I can certainly provide the test file, but I can describe the problem areas as ones (in a pretty small font) that appear to Adobe Reader (and also QPDF rendering) as:<br><br>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; M&nbsp; J&nbsp; J&nbsp; A&nbsp; S&nbsp; O&nbsp; N&nbsp; D&nbsp; J"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>"to Buy &nbsp; 0&nbsp; 0&nbsp; 0&nbsp; 0&nbsp; 0&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 0"<br>"Options 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 0&nbsp; 5&nbsp; 3 10 1"<br>"to Sell &nbsp;&nbsp; 0&nbsp; 0&nbsp; 0 1&nbsp; 0&nbsp;&nbsp; 0&nbsp; 2&nbsp; 0&nbsp; 1"<br><br>There are some minor differences because of trying to show this in the Forum font, but you get the picture.&nbsp; This gets extracted as:<br><br>"M J JASONDJ"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - as a single string entry.&nbsp; The related lines below it are interpreted as<br>"to Buy 000000010"<br>"Options0 0 1 1 0 5 3101"<br>"to Sell 000100201"<br><br>Because of the interesting interpretations of these as strings, it looks to me as if it is trying to do something with a word-gap type of processing.<br><br>Another oddity is that the string returns are very slightly different between mode 0,3 and 4.<br><br>mode 0, the string comes back as "Options 0 1 1 0 5 3101" <br>mode 3&nbsp; returns two strings: "Options" and "0011053 10 1"<br>mode 4 returns four "Options" "0011053" "10" and "1", and these stay the same no matter what I set the word gap to.<br><br>Interestingly, "to Buy" gets correctly broken up by mode 4 into "to" and "Buy", but the gap between those two word is visibly quite a bit less than the gaps between the digits on the rest of the line.<br><br>One possibility is that the processing doesn't like single-character "words" and assumes they have been kerned, or somehow spaced out, but still belong together.<br><br>I'm not sure what all this means, but it is one of very few flaws in otherwise very impressive processing.<br><br>Thanks - Howard<br><br>]]>
   </description>
   <pubDate>Sun, 27 May 2012 18:49:24 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9653.html#9653</guid>
  </item> 
  <item>
   <title><![CDATA[DASetTextExtractionWordGap : Yes, I can confirm that the 8.14...]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9111.html#9111</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1849">Papajin</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 12 Feb 12 at 7:05PM<br /><br />Yes, I can confirm that the 8.14 beta worked MUCH better than 8.13.&nbsp; Many thanks!]]>
   </description>
   <pubDate>Sun, 12 Feb 2012 19:05:01 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9111.html#9111</guid>
  </item> 
  <item>
   <title><![CDATA[DASetTextExtractionWordGap :      AndrewC wrote:There are...]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9110.html#9110</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1849">Papajin</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 11 Feb 12 at 8:17PM<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by AndrewC" alt="Originally posted by AndrewC" style="vertical-align: text-bottom;" /> <strong>AndrewC wrote:</strong><br /><br />There are some new PDF's that have become more common lately that have no space character defined when the text is drawn. &nbsp;The PDF is just placing the word in their correct location and is not relying on the space character. &nbsp;This forces Quick PDF Library to guess where the spaces are and this gets quite tricky.<br></td></tr></table><br><br>Trust me, I know this quite well. :)<br><br>I went ahead and redid the documents I was working with using the word-based extraction and put all the "phrases" together myself, so I have some idea what a pain it is.&nbsp; My advantage though was that I could tailor the spacing for my specific need, so it was less likely to put spaces where it shouldn't or vice versa.&nbsp; Still, I prefer to use the built-in version when I can as it makes things easier on my end.<br><br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Quote" alt="Quote" style="vertical-align: text-bottom;" /> We have added some improved code for this into the 8.14 betas and it fixes most of these problem PDFs. &nbsp;Quick PDF Beta 4 can be downloaded from<br><div><div><br>&nbsp;-&nbsp;http://www.quickpdflibrary.com/blog/2012/02/quick-pdf-library-8-14-beta-4-released/</div></div><div><br></div><div>I will be interested to see if this fixes your problem.</div></td></tr></table><br><br>Thanks!&nbsp; I'm doing a new set of documents that are having similar issues, and I'll give it a try.<br><span style="font-size:10px"><br /><br />Edited by Papajin - 11 Feb 12 at 8:42PM</span>]]>
   </description>
   <pubDate>Sat, 11 Feb 2012 20:17:50 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9110.html#9110</guid>
  </item> 
  <item>
   <title><![CDATA[DASetTextExtractionWordGap : There are some new PDF&amp;#039;s...]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9083.html#9083</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 09 Feb 12 at 5:57AM<br /><br />There are some new PDF's that have become more common lately that have no space character defined when the text is drawn. &nbsp;The PDF is just placing the word in their correct location and is not relying on the space character. &nbsp;This forces Quick PDF Library to guess where the spaces are and this gets quite tricky.<div><br></div><div>The text extraction code is handling many different types of PDF's quite well now. &nbsp;If you look inside the PDF text drawing commands of some PDF's you would wonder how the text and words can be put back together.<br><div><br></div><div>We have added some improved code for this into the 8.14 betas and it fixes most of these problem PDFs. &nbsp;Quick PDF Beta 4 can be downloaded from<br><br></div><div>&nbsp;-&nbsp;http://www.quickpdflibrary.com/blog/2012/02/quick-pdf-library-8-14-beta-4-released/</div></div><div><br></div><div>I will be interested to see if this fixes your problem.</div><div><br></div><div>Andrew.</div><div><br></div>]]>
   </description>
   <pubDate>Thu, 09 Feb 2012 05:57:37 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9083.html#9083</guid>
  </item> 
  <item>
   <title><![CDATA[DASetTextExtractionWordGap : I&amp;#039;m using library version...]]></title>
   <link>http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9078.html#9078</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1849">Papajin</a><br /><strong>Subject:</strong> 2139<br /><strong>Posted:</strong> 08 Feb 12 at 8:16PM<br /><br />I'm using library version 8.13 and I'm extracting text from pdf's using DAExtractPageText.&nbsp; I've run into a few documents that aren't extracting quite the way I'd like using using an "Options" setting of 3 (3 = Return a CSV string for each piece of text on the page with the following format:&nbsp; Font Name, Text Color, Text Size, X1, Y1, X2, Y2, X3, Y3, X4, Y4, Text).&nbsp; It's putting some "words" together that shouldn be separate.&nbsp; In order to address this issue, I figured I'd use the fairly new DASetTextExtractionWordGap function to try and clean things up a bit.<br><br>Unfortunately so far, I haven't been able to get this function to have any impact on what's being extracted at all.&nbsp; Has anybody had any success using this command and if so, what sort of wordgap values were you using?&nbsp; By default I've been using 0.7, which I _think_ is what the default is, but I'm not 100% certain of that anymore.&nbsp; Adjusting that value both higher and lower seems to have no impact.&nbsp; What's the trick to getting this to work?<br><br>Thanks!<br>]]>
   </description>
   <pubDate>Wed, 08 Feb 2012 20:16:31 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/dasettextextractionwordgap_topic2139_post9078.html#9078</guid>
  </item> 
 </channel>
</rss>