Text selection on PDF after rendering using the drawLayer for ipad

后端 未结 1 1971
感情败类
感情败类 2020-12-06 00:48

I\'m trying to highlight the text on the pdf after rendering on the ipad.I feel I\'m achieving something with a lot of googling and the sample code provided by fastPdfKit. F

相关标签:
1条回答
  • 2020-12-06 01:44

    (NSArray *)searchResultOnPage:(NSUInteger)pageNr forSearchTerms:(NSString *)searchTerm returns an NSArray of MFTextItems. MFTextItem has a property called highlightPath that returns a CGPathRef. Is that what you are using?

    If you need to get a CGRect from the highlightPath, you could use CGPathGetBoundingBox.

    If the highlightPath is not accurate enough for you, you are going to have to be creative and come up with a solution on your own.

    0 讨论(0)
提交回复
热议问题