在打印假脱机程序C#中为文档添加水印 [英] Add a watermark to a document in the print spooler C#

查看:236
本文介绍了在打印假脱机程序C#中为文档添加水印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我使用Windows API函数来监控printjob并能够获取文档名称,作业ID,机器名称等信息。现在我成功使用jobid暂停当前的打印作业。现在的问题是我想在文档中添加水印并恢复打印机。我试图获取文档的完整路径,但Windows API打印中没有数据结构。任何帮助将不胜感激。



我尝试过:



尝试

Hi,

I am using Windows API functions to monitor a printjob and able to get the information like document name, job id, machine name etc. Now I paused the current print job by using the jobid successfully. The question is now I want to add a watermark to the document and resume the printer. I tried to get the Full path of the document but no data structure in Windows API printing gives it. Any help would be appreciated.

What I have tried:

Tried

PRINTER_NOTIFY_INFO_DATA 

structre

PrintQueue类

PrintSystemJobInfo类

structre
PrintQueue class
PrintSystemJobInfo class

推荐答案

Google是你的朋友:



Google - c#在打印页面上添加水印 [ ^ ]
Google is your friend:

Google - c# add watermark to printed page[^]


我相信你< b> 不能 通过WinAPI为打印文档添加水印,因为打印队列与文件名列表不同。这是一个用他们的名字打印的作业列表,但这并不意味着你可以访问已经打印过的文档列表....
I believe you can't add a watermark to a printed document through the WinAPI, because a print queue is not the same as a list of filenames. It's a list of jobs to print with their names, but it doesn't mean you have an access to the list of documents, which are already printed....


这篇关于在打印假脱机程序C#中为文档添加水印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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