Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. using asprise_imaging_api;
  2.  
  3. Result result = new AspriseImaging().Scan(new Request()
  4. .SetTwainCap(TwainConstants.ICAP_PIXELTYPE, TwainConstants.TWPT_RGB)
  5. .SetTwainCap(TwainConstants.ICAP_SUPPORTEDSIZES, TwainConstants.TWSS_USLETTER)
  6. .SetPromptScanMore(true) // prompt to scan more pages
  7. .AddOutputItem(new RequestOutputItem(AspriseImaging.OUTPUT_SAVE, AspriseImaging.FORMAT_PDF)
  8. .SetSavePath("U:\${TMS}${EXT}")), // Environment variables in path will be expanded
  9. "select", true, true); // "select" prompts device selection dialog.
  10.  
  11. List<string> files = result == null ? null : result.GetImageFiles();
  12. Console.WriteLine("Scanned: " + string.Join(", ", files == null ? new string[0] : files.ToArray()));
  13.  
  14. Install-Package asprise-scan-scanner-twain-wia-api
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement