“The parameter is incorrect” when setting scan file format to PDF

こ雲淡風輕ζ 提交于 2020-03-03 12:09:59

问题


I am trying to make a UWP app that allows users to quickly set a few settings and then scan a document. One of the settings I want to give the user is to choose between a Tiff or a PDF. When I set the file format to PDF which is in the enum list of File Formats you can set to a scanner configuration I am getting an exception thrown. The exception is "The parameter is incorrect"

Other applications are able to scan as a PDF with my type of scanner (Fujitsu fi-6130) but my application will not, I even tried a long shot of making sure my locally installed Adobe was up to date not that I thought those two would interact. When I set the format to a Tiff, or png I do not get any error and they scan no problem.

I have followed the documentation to configure a scanner correctly and PDF is listed as an available Format here ImageScannerFormat Documentation

// MyScanner is an instance of ImageScanner class
MyScanner.FeederConfiguration.Format = ImageScannerFormat.Pdf;

It fails at this line, not when I try to scan files, Tiff, PNG, and Bitmap have all worked, not sure about the other available format because I have not tested them.

I expect the scanner to accept PDF as a file format and to then scan the files as a PDF.

Let me know if you have any questions, thanks!

来源:https://stackoverflow.com/questions/55979049/the-parameter-is-incorrect-when-setting-scan-file-format-to-pdf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!