如何在打印文档之前捕获文档的内容

如何在打印文档之前捕获文档的内容

本文介绍了如何在打印文档之前捕获文档的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想要在打印之前捕获为打印发送的文档的内容。我是否需要编写任何在触发任何打印事件时拦截打印系统调用的DLL然后捕获数据?或者这可以利用任何现有的DLL来实现?或者有没有其他简单的方法这样做。



我想在任何平台上进行这项工作,截取打印系统调用是捕获数据的唯一方法。



请提供您如何实现这一目标的建议。如果您能提供一些示例代码,将不胜感激。



谢谢,

Sid



我尝试了什么:



我想用WMI暂停打印机并在它们到达之前获取PrintJobs打印。但它似乎不是一个可行的解决方案。

解决方案

Hi,

I would like to capture the contents of a document which was sent for the printing, before it gets printed. Do I need to write any DLLs which would intercept the print system call when any printing event is triggered and then capture the data? or this could be achieved leveraging any existing DLLs? or is there any other simple way doing this.

I was thinking to make this work on any platform, intercepting the print system call is the only way capturing the data.

Kindly provide your suggestions on how to achieve this. It would be grateful if you could provide some sample code.

Thank you,
Sid

What I have tried:

I thought of using WMI to pause the printer and get the PrintJobs before they get printed. But it seems its not a feasible solution.

解决方案


这篇关于如何在打印文档之前捕获文档的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 07:19