如何重新发送打印机假脱机作业以打印队列 [英] How to re-send printer spooled job to print queue

查看:332
本文介绍了如何重新发送打印机假脱机作业以打印队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Internet和CodeProject上搜索以找到有关此主题的帮助,但找不到任何有用的信息.

我有一些文件,并打印了出来.我现在已经丢失了重要文件.
但是,由于我的打印机设置,我仍然有假脱机文件(* .spl和* .shd).

有什么办法可以再次将这些文件重新发送到打印机吗?

感谢任何建议.

I searched the Internet and CodeProject to find help with this subject but I could not find any useful information.

I had some documents and I printed them. I have now lost the important documents.
However, due to my printer settings, I still have the spooled files (*.spl and *.shd).

Is there any way to re-send those files to printer again?

Any suggestion appreciated.

推荐答案

不知道执行此操作的任何应用,但这是一些信息.
shd文件应仅包含打印作业设置,因此您可以忽略它.
spl文件包含您的打印数据.它可以以RAW(打印机格式)或EMF格式记录,不知道您拥有什么.
如果是RAW :
它可以是PS或PCL或任何其他打印机标准格式.这两个比较常见.如果是PS(文件内容通常以%开头,后跟一些注释).您应该能够找到一些ps到pdf转换器. Adobe蒸馏器做到了.如果是PCL或其他原始格式,则&如果您是C/C ++开发人员,并且可以使用Win32 API,则可以打开打印机&推送原始数据尝试获取打印件(可以使用虚拟pdf打印机).如果需要的话,我会让您知道要在API中使用哪些函数.

如果是EMF:
真讨厌我认为它与标准Windows EMF格式&不兼容.里面很乱检查此查看器
http://www.codeproject.com/KB/printing/EMFSpoolViewer.aspx [ ^ ]

我还发现了这个共享软件,它声称可以查看许多内部格式的spl文件.
http://www.prnwatch.com/pviewer.htm [
Dont know any app that does it, but here''s some info.
The shd file should contain just the print job settings, so you may ignore it.
The spl file contains your print data. It can be recorded in RAW (printer format) or EMF format, dont know what you have.
If its RAW:
It may be in PS or PCL or any other printer standard format. These two are more common. If its PS (file contents usually starts with a % followed by some comments). You should be able to find some ps to pdf converters. Adobe distiller does it. If it''s PCL or some other raw format, & if you are a C/C++ developer and can play with the Win32 API, you may open a printer & push the raw data & try to get the print (could use a virtual pdf printer). I''ll let you know what functions to use in the API if you want to.

If its EMF:
That''s nasty. I dont think its compatible with the standard windows EMF format & it''s messy inside. Check this viewer
http://www.codeproject.com/KB/printing/EMFSpoolViewer.aspx[^]

I also found this shareware which claims to view spl files of many internal formats
http://www.prnwatch.com/pviewer.htm[^]

They might print back


,这与常规打印例程有点不同.

使用OpenPrinter()打开打印机-确保将数据发送到同一台打印机.
致电StartDocPrinter()
注意:您必须传递一个DOC_INFO_1结构,其中pDatatype(其成员)设置为"RAW"(大写).这没有充分的记录和说明.大多数程序员都会犯错.
然后调用StartPagePrinter()

现在调用WritePrinter()传入文件中的所有字节. (您必须先阅读文件内容:)

最后调用EndPagePrinter(),EndDocPrinter()&按顺序使用ClosePrinter().

请参阅这些功能的api文档,因为有很多关于它们的说明.

我仍然建议您使用共享软件(如果可行).上面的内容可能会花费一些时间(如果您不习惯使用API​​,那么就像地狱一样)

祝你好运
This is a little different from normal printing routines.

Open the printer using OpenPrinter() - make sure you send the data to the same printer.
Call StartDocPrinter()
Note: You must pass a DOC_INFO_1 structure with pDatatype(a member of it) set to "RAW" (upper case). This is not well documented & most programmers get this wrong.
And then call StartPagePrinter()

Now call WritePrinter() passing in all the bytes in the file. (you must have read the file contents before : )

Finally call EndPagePrinter(), EndDocPrinter() & ClosePrinter() in order.

Please see the api documentation for these functions as there is a lot to explain about them.

I still suggest you to use the shareware if it works. The above stuff can take time (& like hell if you''re not used to the API)

Good Luck


尊敬的strogg625,谢谢您的答复.
spl文件格式为RAW且不以%开头.我是C ++开发人员,如果您让我知道要使用的功能,我将不胜感激.
Dear strogg625, thank you for your reply.
The spl file format is RAW and does not started with %. I am C++ developer and I would appreciate it if you would let me know what functions to use.


这篇关于如何重新发送打印机假脱机作业以打印队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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