title: IOS how to decode PDF CIDFontType2 text
body: <p>I want to search text in pdf in chinese. I am using CGPDFScanner. I can't get the correct text with CIDFontType2.</p>
  
  <p>my font object has <code>ToUnicode</code> entry</p>
  
  <p>fontName is <strong>HFKAAO+LinGothic-Bold</strong></p>
  
  <p>it has <code>CIDToGIDMap</code> entry with name identity (pdf document said it means truetype font program is embedded)</p>
  
  <p>CIDSystemInfo <br>
  Registry is Adobe <br>
  Ordering is Identity <br></p>
  
  <p>it has FontFile2 entry in FontDescriptor Filter with FlateDecode</p>
  
  <p>I found someone said I just inflate the text I got from Tj but that does not work... I used zlib to inflate the text , and it seems that it is not produce correct data.</p>
  
  <p>Is there any sample code that I can study?</p>
  
  <p>I just found <a href="https://github.com/KurtCode/PDFKitten" rel="nofollow">https://github.com/KurtCode/PDFKitten</a> but it can not work with chinese....</p>