Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using asprise_imaging_api;
- Result result = new AspriseImaging().Scan(new Request()
- .SetTwainCap(TwainConstants.ICAP_PIXELTYPE, TwainConstants.TWPT_RGB)
- .SetTwainCap(TwainConstants.ICAP_SUPPORTEDSIZES, TwainConstants.TWSS_USLETTER)
- .SetPromptScanMore(true) // prompt to scan more pages
- .AddOutputItem(new RequestOutputItem(AspriseImaging.OUTPUT_SAVE, AspriseImaging.FORMAT_PDF)
- .SetSavePath("U:\${TMS}${EXT}")), // Environment variables in path will be expanded
- "select", true, true); // "select" prompts device selection dialog.
- List<string> files = result == null ? null : result.GetImageFiles();
- Console.WriteLine("Scanned: " + string.Join(", ", files == null ? new string[0] : files.ToArray()));
- Install-Package asprise-scan-scanner-twain-wia-api
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement