Never having converted an existing PDF to byte[] before I used some free source code. My problem is that "InputStream" isn't recognized. The MSDN Library seems to classify it under the import System.Web but I have already imported this (! I think there might also be a prob with "new File()". Here is my code:

   public static byte[] convertDocToByteArray(String sourcePath) 
            byte[] byteArray=null; 
            try { 
                  File file = new File(sourcePath);
                  InputStream inputStream = new FileInputStream(file);
                  byte[] bytes = new byte[file.length()];
            } catch (FileNotFoundException e) 
            } catch (IOException io) 

            return byteArray; 
And here are my imports:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Azubiportal.AZPService;
using iTextSharp.text;
using iTextSharp.text.pdf;
using iTextSharp.text.xml;
using System.Net.Mail;
using System.IO;
using System.Data;
using System.ComponentModel;
using System.Collections;