title: What is wrong with my encoding, when reading characters from PDF?
body: <p>I'm reading a PDF file with C#, but the characters are coming from another encoding, and returning different characters than those which I expected from when I view the file in a PDF viewer.</p>
  
  <p>I thought a UTF-8 encoding would be correct.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>string file = @"c:\document.pdf";
  Stream stream = File.Open(file, FileMode.Open);
  BinaryReader binaryReady = new BinaryReader(stream);
  byte[] buffer = binaryReady.ReadBytes(Convert.ToInt32(stream.Length));
  var encoder = UTF8Encoding.UTF8.GetString(buffer);
  </code></pre>