如何查找已排队打印的文件位置 [英] How to find file location which has been queued for printing
本文介绍了如何查找已排队打印的文件位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能的重复:
如何获取原始完整Spooler API 打印的文件路径
try
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2","SELECT * FROM Win32_PrintJob");
}
foreach (ManagementObject queryObj in searcher.Get())
{
Console.WriteLine("Document: {0}", queryObj["Document"]);
}
这给出了文档名称,我需要文件的位置.
This gives the document name, I need the location of the file.
推荐答案
一旦文档被传递给假脱机程序,它就不会再引用此信息.请参阅此处Win32_PrintJob 中存储哪些字段的信息
Once the document is passed to the spooler, it will not have any reference to this information. See here for info on what fields are stored in Win32_PrintJob
这篇关于如何查找已排队打印的文件位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文