可能重複文件位置:
How to get the original full file path been printed by 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"]);
}
這使文檔名稱,我需要的文件的位置。
相關:http://stackoverflow.com/questions/4236762/how-to-get-the-original-full-file-path-been-printed-by- spooler-api –