4

I have implemented Pdf reading library from this tutorial:. It's based on VFR Reader.

Now I want to add List search results functionality. If you have some idea about FastPdfKit it's provided List search functionality.

I want same search functionality as attached image.

If any body had implemented same search functionality in VFR Reader than I will really appreciate your help.

Thanks in advance

iPhone Screenshot showing search functionality

freelancer
  • 1,658
  • 1
  • 16
  • 37
  • Is there a particular issue your having whilst trying to implement or don't you have a clue where to start? You don't tell us exactly what you are after. It just seems like - "I want to implement this can someone do it for me." That is just my opinion. +1 for the links they are interesting. – Popeye Apr 18 '13 at 13:34
  • @Popeye thanks for replay, i really have not clue where to start from, if you can give some clue what i have to do from now on? from where can i start it? its very help full to me, i really appreciate your help. – freelancer Apr 19 '13 at 05:06

1 Answers1

3

You can use following method to find words from pdf. It may help you.

-(BOOL)page:(CGPDFPageRef)inPage containsString:(NSString *)inSearchString;
{
[self setCurrentData:[NSMutableString string]];
CGPDFContentStreamRef contentStream = CGPDFContentStreamCreateWithPage(inPage);
CGPDFScannerRef scanner = CGPDFScannerCreate(contentStream, table, self);
bool ret = CGPDFScannerScan(scanner);
CGPDFScannerRelease(scanner);
CGPDFContentStreamRelease(contentStream);
 NSLog(@"%@",[currentData uppercaseString]);
 NSLog(@"%d",[[currentData uppercaseString]rangeOfString:[inSearchString uppercaseString]].location != NSNotFound);
return ([[currentData uppercaseString]rangeOfString:[inSearchString uppercaseString]].location != NSNotFound);
}
Rahul Patel
  • 5,858
  • 6
  • 46
  • 72