我如何获得打印作业Documnet名称(文件地址)? [英] How do I Get Print Job Documnet Name ( File Address )?

查看:79
本文介绍了我如何获得打印作业Documnet名称(文件地址)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取打印作业的文件地址,我在JOB_INFO_2记录中拥有它的信息,它具有一个名为 DocumentName的字段,但不是Document File Name! ,其Just Just Caption of Window已发送了打印请求

I want to get File Address of a Print Job , I have it`s information in a JOB_INFO_2 Record , it have a field named "DocumentName" but it isn't Document "File Name" ! , its Just Caption of Window have sent Print request

是否可以获取Job的文件名/地址?

Is it Possible to get Job`s File Name/Address ?

可以获取 DocumentName的窗口句柄,然后获取Handle的文件名(进程名),但是如何获取文档文件名?

its possible to get Window Handle of "DocumentName" and next to get File Name (Process Name) of Handle , but how can I get Document File Name ?

例如:我已经打开了一个Win-Word DOC文件,通过上述解决方案,我们可以获得MS-Word Exe文件地址,但是我想获取DOC文件的文件名/地址

For example : I have opened a DOC File win MS-Word , with the solution above , we can get the MS-Word Exe File Address , but I want to get File Name/Address of DOC File

此外,当Document为图片时,没有标题!

Furthermore when Document is a Picture , there is no Caption !

推荐答案

不一定那种东西。您可以打印各种各样的东西而无需先将其保存到磁盘,因此可能没有文件名。即使存在,该文件也不一定与发送给打印机的文件相匹配-人们一直在打印东西而无需先保存更改。

There isn't necessarily any such thing. You can print all sorts of things without saving it to disk first, so there might not be a file name. And even if there is, the file won't necessarily match what got sent to the printer — people print things all the time without saving their changes first.

大多数您似乎正在阅读的字段只是 informational 字段。不需要打印应用程序来提供它们,当打印应用程序提供它们时,就不需要它们准确无误,因为Windows不需要它们来执行打印作业。他们只是很高兴看到打印管理器的用户可以了解发生了什么。

Most of the fields you seem to be reading are just informational fields. The printing application isn't required to provide them, and when it does, they're not required to be accurate because Windows doesn't need them to be able to perform the print job. They're just nice to have to the user looking at the print manager can have an idea of what's happening.

这篇关于我如何获得打印作业Documnet名称(文件地址)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆