本文介绍了使用WIN32 API打印文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
-SA
If you use C#, printing directly with Win32 API would be 1) awkward, hard to implement, 2) not platform-portable (in contrast to using CLI and .NET FCL — you would be able to run your code on a number non-Microsoft platforms). I see no situations where you can get any benefits of it. As most members also don't like waste their time on something which does not make sense or not really useful, you will need to provide a convincing motivation of what you want, but I don't think you can succeed.
—SA
我需要将我的SPFolder中找到的文件直接打印到打印机而不识别文件类型,以便调用哪个Windows API以及如何调用它?当有多个文件同时打印时,启动打印作业的过程是什么?
I need to print my Files found in my SPFolder directly to the Printer without recognizing the file type, so which Windows API to call and how to call it ? Also what's the process to launch the printing job when there are many files to print at the same time ?
推荐答案如果使用C#,直接使用Win32 API打印将是1)笨拙,难以实现,2)不是平台可移植的(与使用 CLI 和.NET FCL - 您可以在非编号上运行代码微软平台)。 我认为没有任何可以获得任何好处的情况。由于大多数成员也不喜欢把时间花在没有意义或没有用的东西上,你需要提供一个令人信服的动机你想要什么,但我认为你不能成功。
您好, 您可以使用假脱机程序API。本文可以帮助您: http://支持.microsoft / kb / 322091 / zh-CN [ ^ ] support.microsoft/ kb / 138594 / zh-CN [ ^ ] 问候, Maxim。 Hello, You can use spooler API. This articles helps you: support.microsoft/kb/322091/en-us[^] support.microsoft/kb/138594/en-us[^] Regards, Maxim.
这就是你要找的东西: This is what you're looking for: var processStartInfo = new ProcessStartInfo(filename) { Verb = "Print", CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden }; Process.Start(processStartInfo);
更多推荐
使用WIN32 API打印文件
发布评论