views:

182

answers:

0

Hi guys :) I am trying to implement full text search using Quartz 2D but it's a nightmare. I can "extract" text from pdf page using PDF Operator (TJ and other...)

    CGPDFOperatorTableRef myTable;

myTable = CGPDFOperatorTableCreate();

CGPDFOperatorTableSetCallback (myTable, "BT", &op_BT);
CGPDFOperatorTableSetCallback (myTable, "Td", &op_Td);
CGPDFOperatorTableSetCallback (myTable, "TD", &op_TD);
CGPDFOperatorTableSetCallback (myTable, "Tm", &op_Tm);
CGPDFOperatorTableSetCallback (myTable, "T*", &op_T);
CGPDFOperatorTableSetCallback (myTable, "TJ", &op_TJ);
CGPDFOperatorTableSetCallback (myTable, "Tf", &op_TF);
CGPDFOperatorTableSetCallback (myTable, "ET", &op_ET);

But in the same time I need to highlight a match on PDF page with some rectangle like it's done in Safari for example. Any suggestions how to implement this? Is there some solutions that don't require to such immense work?