Which are the pdf operators needed to do a search feature in a PDF in iphone sdk?

前端 未结 3 640
一向
一向 2020-12-05 12:24

I have a been trying to do a search feature in a PDF application. I read the Quartz 2d guide in iphone reference library. And so much has been said about the \"pdf operators

3条回答
  •  一整个雨季
    2020-12-05 13:09

    There are four operators that show text, namely Tj, ', " and TJ. When you set up your operator table you must escape at least the double quotation mark like so.

    CGPDFOperatorTableSetCallback(table, "\"", doubleQuot);
    

    I did the same thing for the single quotation mark as well, just to be sure.

    If you read chapter "9.4.3 Text-Showing Operators" from the reference document purecharger linked to carefully, you will see that the quotation mark operators are actually composed of multiple simpler operators like Tj, but you must scan for them anyways or you might miss some text.

    All of these operators are always inside a BT context. You already noticed that the BT operator itself does not have any parameters, but if you keep track of the text matrix (only needed if you want to do positioning) then you should set it to the identity matrix.

提交回复
热议问题