title: How to get page count of pdf byte array generated through SSRS
body: <p>My task is to get page count of a pdf content. I made use of SSRS tools to generate pdf byte array. Once I get byte array I need to get the page count of this byte array generated. C# is the programming language used.</p>
  
  <p>Currently I am creating a pdf file physically, using the generated pdf byte array. Later I am opening the pdf file in the memory and getting the page count. Finally I am deleting the file that has been created for temporary purpose.</p>
  
  <p>Is there any way to get the page count of the generated pdf byte array without creating a physical file? Or can I create a pdf file object in the memory? </p>
  
  <p>PDF creation needs extra security permissions and we don't use pdf file for any other purpose.</p>