M.mhr
M.mhr

Reputation: 1749

How do I Get Print Job Documnet Name ( File Address )?

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

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

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 ?

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

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

Upvotes: 3

Views: 1662

Answers (1)

Rob Kennedy
Rob Kennedy

Reputation: 163277

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.

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.

Upvotes: 5

Related Questions