在 UWP 中打印原始数据
Print raw data in UWP
我正在 UWP 中开发应用程序。我需要向我的打印机发送一个 RAW 字符串(或文件)并进行打印。我成功地使用了 here.
中的旧 RawPrinterHelper
我在使用 Windows 应用程序认证工具包验证应用程序时遇到了一些问题。
我收到这样的错误:
API ClosePrinter in winspool.drv is not supported for this application type. MyApp.dll calls this API.
我认为RawPrinterHelper
中的DllImport()
是错误的。
有没有办法使用不同的 RawPrinterHelper
或以某种方式绕过 Windows 应用程序认证工具包?
P.S。我需要在 Microsoft Store 上发布该应用程序。
如果您已经 运行 使用发布版本进行 WACK 测试,那么正如所描述的错误,windows 商店应用程序不支持 API。更多详情请参考Supported API test.
Is there a way to use a diffent RawPrinterHelper or bypass the Windows App Certification Kit in some way
windows商店应用中的打印相关功能,请关注this tutorial and the official sample. This provide alternatives to the windows print relative APIs. Details please reference Printing and documents section of Alternatives to Windows APIs in Universal Windows Platform (UWP) apps。
如果你想要没有打印对话框的打印功能,你可以参考this thread。
我正在 UWP 中开发应用程序。我需要向我的打印机发送一个 RAW 字符串(或文件)并进行打印。我成功地使用了 here.
中的旧RawPrinterHelper
我在使用 Windows 应用程序认证工具包验证应用程序时遇到了一些问题。 我收到这样的错误:
API ClosePrinter in winspool.drv is not supported for this application type. MyApp.dll calls this API.
我认为RawPrinterHelper
中的DllImport()
是错误的。
有没有办法使用不同的 RawPrinterHelper
或以某种方式绕过 Windows 应用程序认证工具包?
P.S。我需要在 Microsoft Store 上发布该应用程序。
如果您已经 运行 使用发布版本进行 WACK 测试,那么正如所描述的错误,windows 商店应用程序不支持 API。更多详情请参考Supported API test.
Is there a way to use a diffent RawPrinterHelper or bypass the Windows App Certification Kit in some way
windows商店应用中的打印相关功能,请关注this tutorial and the official sample. This provide alternatives to the windows print relative APIs. Details please reference Printing and documents section of Alternatives to Windows APIs in Universal Windows Platform (UWP) apps。
如果你想要没有打印对话框的打印功能,你可以参考this thread。