Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

WordFinder and filenames

$
0
0
I use code below to make some activity when PDF contains desired filename. But dot(.) in filename force wordfinder to recognize filename in pdf-file as 2 different words(at least 2 :( ). Could somebody help me to configure wordfinder to receive filenames as 1 word?

pdWordFinder = PDDocGetWordFinder( pdDoc, 0 );

pdPage = PDDocAcquirePage( pdDoc, nPageNum );
PDWordFinderAcquireWordList ( pdWordFinder, nPageNum, &pdWord, NULL, NULL, &nWordCount );

int nWordCounter = 0;
for(; nWordCounter < nWordCount; nWordCounter++ )
{
PDWord pdNWord = PDWordFinderGetNthWord( pdWordFinder, nWord );
char szWordBuff[ MAX_PATH ] = {0};
PDWordGetString ( pdNWord, szWordBuff, MAX_PATH );
CString strNWord( szWordBuff );

if( strNWord == filename )
{
//...some code here
}
}
//... close all handles

Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>