title: C# : How to convert a local pdf file to a byte [][]
body: <p>SITUATION</p>
  
  <ul>
  <li>Using C# ASP.NET on VS 2008</li>
  <li>I want to
  <ul>
  <li>Read a pdf file from my local directory (What stream type do I use? Can I use filestream?)</li>
  <li>Put this pdf file into a byte[][] variable</li>
  </ul></li>
  </ul>
  
  <p>QUESTIONS</p>
  
  <ul>
  <li>Being new to C#, I would like suggestion (please explain with code), on how I can achieve this.</li>
  <li>I need to know this to complete my project. Any other inputs will be appreciated.</li>
  </ul>
  
  <p>The code is as follows 
  <pre><code>
     <code>byte[][] pdfDoc= new byte[1][];</code><br>
     <code>byte[] outputDoc = File.ReadAllBytes(@"d:/test.pdf");</code></p>
  
  for (int x = 0; x &lt; pdfDoc.Length; x++)
      {
          pdfDoc[x] = outputDoc;
  
      }
  </code></pre>
  
  <p>
  But it is failing, not able to read the file from the d:/test.pdf location.
  Thanks.</p>