none
[UWP][C++]Trouble using Windows.Devices.Scanners RRS feed

  • Question

  • I am trying to create a very simple scanning application for my work. The goal is that people at Kiosks will be able to place their piece of paper into a scanner. Press scan on my application and it will bring open an email message where they can use our address book to send it to someone. Or from my application they can type in the recipient if they know it and it will send automatically.

    I am building in with UWP and C# and I am targeting version 1809. I want to give users the option between TIFF and PDF so they can choose their file type in very few clicks but I am having a problem using PDF on a Feeder style scanner and using both PDF and TIFF on a flatbed scanner.

    The line of code below will throw a base exception with the following message: Message = "The parameter is incorrect.\r\n"

    myScanner.FeederConfiguration.Format = ImageScannerFormat.Pdf;

    So I guess my question is have any of you dealt with the new Windows.Devices.Scanners namespace for .Net Core 2.2? If I were to use my same scanner in the default Scan app that Windows 10 ships with it lets me select any file type and scans without any problem. Are they always scanner in bitmap and converting it another way or is it targeting different drivers than mine. I have not seen anywhere where I can set the drivers I want to use. It only lets me choose a scanner.

    Any help would be appreciated and I would be happy to answer any questions you may have. Thanks!


    Friday, July 12, 2019 12:44 AM

All replies

  • Hello JDBaur,

    This forum is for "Discuss Windows SDK Documentation, Samples and Tools."

    Since this issue is UWP related I'll move it to UWP forum for more professional support.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 12, 2019 2:37 AM
  • Hi,

    Currently we do not have such a device here. I'll involve another engineer to take a look at this. There might be some time delay. Thank you for your patience.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 12, 2019 6:08 AM
    Moderator
  • Hello JDBaur,

    >>The line of code below will throw a base exception with the following message: Message = "The parameter is incorrect.\r\n"

    Before using this code: myScanner.FeederConfiguration.Format = ImageScannerFormat.Pdf, please use this ImageScannerFlatbedConfiguration.IsFormatSupported(ImageScannerFormat) method to check whether the scanner's Flatbed supports the specified file format or not.

    Thanks,
    Amy Peng



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 16, 2019 9:01 AM
    Owner