title: How to display/save multiple (ADF) WIA images after scanned
body: <p>I was tasked with creating a document digitizing program since the one the company bough borders on the awful. Its bad. Really bad. After some research I started a VB.NET WPF program. I already made login section and created the folders in a server where the files will be going, with the location of each file being saved in a SQL table. Anyway I basically need three things that are giving me a headache!</p>
  
  <p>1) How to scan multiple pages with WIA? This is my current, and very raw scanning code:</p>
  
  <pre><code>    Dim CD As New WIA.CommonDialog
      Dim txt As String
      Dim picture As Image
  
      Dim F As WIA.ImageFile = CD.ShowAcquireImage(WIA.WiaDeviceType.ScannerDeviceType)
      txt = txt1.Text
      F.SaveFile("\\serverlocation" + txt + "." + F.FileExtension)
  </code></pre>
  
  <p>Txt is basically the name being given by the user. The problem is that this code only scans ONE page, how can I make it save multiple ones in the same file/separate files? (whichever works best).</p>
  
  <ol>
  <li><p>In the same spirit of the previous question, is there a way to convert these files to JPEG/PNG (BMP takes a LOT of space) or even convert them to a PDF file if the user so wishes?</p></li>
  <li><p>How do I display the scanned picture after its been scanned? </p></li>
  </ol>
  
  <p>I am using VB.NET and WPF (not Forms). Any replies will be greatly appreciated :).</p>
  
  <p>EDIT: Closest thing I've managed to multiple ADF scanning with <a href="http://forums.codeguru.com/showthread.php?439027-Windows-Image-Acquisition-%28WIA%29-Code" rel="nofollow">http://forums.codeguru.com/showthread.php?439027-Windows-Image-Acquisition-%28WIA%29-Code</a> . I converted C# to VB but the code throws me errors in the compiler.</p>