title: Checking uploaded pdf for virus in ASP.NET
body: <p>So I did some research on checking an uploaded pdf for viruses and I found these 2 solutions:</p>
  
  <ol>
  <li><p>Save the file to the hard disk, let the antivirus quarantine/delete it if it was infected, then check if the file still exists on the disk.</p></li>
  <li><p>Use an antivirus that supports calling it through .net and scan the file</p></li>
  </ol>
  
  <p>What I am thinking instead is to read the uploaded pdf file stream using something like iTextSharp then writing a new file but after stripping any macros.</p>
  
  <p>One of the benefits would be making sure that the uploaded file is a pdf since it will be parsed by the iTextSharp, but would it also protect it from viruses?</p>