title: What to do with CIDs in text extracted by PDFMiner?
body: <p>I've some PDFs which are in Hindi, and have extractable text. I used <a href="https://github.com/pdfminer/pdfminer.six" rel="noreferrer">pdfminer.six</a> for python 3.6, to do the extraction. The output looks like:<br>
  <a href="https://i.stack.imgur.com/cZGKz.png" rel="noreferrer"><img src="https://i.stack.imgur.com/cZGKz.png" alt="enter image description here"></a></p>
  
  <p>As one can see, there are a number of characters that are converted into the form "(cid :number)". </p>
  
  <p>On further analysis, I found out that a PDF contains CMAPs which map character codes to glyph indices. So, a CID is a character identity for the glyph it maps to, inside the CMAP table.</p>
  
  <p>But how are these character codes related to Unicode values? Basically, how is a PDF viewer able to show the glyph using this mapping?   </p>
  
  <p>Moreover, according to a comment to <a href="https://stackoverflow.com/q/22908556/5345646">this</a> similar question, this process may not be legal. But I'm not trying to steal someone's font. I want the text. How does this process become illegal?  </p>
  
  <p>Since there are many questions like this one, I want to clarify that I do not aim at solving the "cid" problem. I want to clarify the reasons for the problem and reasons for it's illegality.</p>
  
  <p><strong>EDIT:</strong> <a href="https://github.com/euske/pdfminer/issues/39" rel="noreferrer">This <em>issues</em> page</a> for <code>pdfminer</code> discusses this issue, where the author clearly says that there seems to be no reliable workaround for this issue. Is there some general, basic limitation (like, no access to font) that makes this issue continual?</p>