Does it seem that the “word count” property and “count words” command on the plain text of a document (markdown, rtf, pdf) is different? Moreover, tests on a limited sample show that (1) the “word count” property is consistently larger than the count word for pdf files and (2) the “word count” property is consistently smaller than the count word for plain text and markdown files and (3) only in the case of rtf the “word count” property is the same as the count word for pdf files.
For example, I select a pdf file and get the following results
tell application id "DNtp"
set {theDoc} to item 1 of {selection}
set theText to plain text of theDoc
set theWordCount to word count of theDoc
-- return 8698
set theCountWord to count words of theText
-- return 8527
end tell
This is no big deal coz it is easy to work around on this issue, just curious.
Thank you very much in advance!