spooler

Default printer settings are ignored

試著忘記壹切 提交于 2020-01-04 01:58:11
问题 Using Windows Print Spooler API's, we can print out XPS files. The problem is that the print spooler ignores the default printer settings . (We've given up on trying to apply printer settings. Default printer settings will just have to suffice.) For example... the printouts always come out in colour and on one paper per page, regardless of what the settings are set to in the control panel: black & white/colour, duplex/not duplex, multiple pages per sheet/single page per sheet. Other

Prevent User from Printing

喜夏-厌秋 提交于 2019-12-23 03:35:06
问题 I've created an application in .net to monitor jobs in the printer by using the DLL in the following reference : http://www.codeproject.com/Articles/51085/Monitor-jobs-in-a-printer-queue-NET?fid=1556859&select=4799234 my question is : how can i delay or prevent user from printing after he print for example 5 times a day ? Knowing that The print jobs will saved in the DB. I appreciate any help. 回答1: A fairly simply program could be written using the FindFirstPrinterChangeNotification function

ResetDC() does nothing (print spooler API's for Windows)

六月ゝ 毕业季﹏ 提交于 2019-12-11 13:35:02
问题 I've written wrapper classes for Windows' print spooler APIs, which work... mostly. The only thing that does not work is applying printer settings . First I call DocumentProperties() to successfully acquire and play with printer settings. Then I try to apply those settings using ResetDC() but nothing happens. The function takes a valid handle, and returns the same valid handle, meaning it should have applied the settings. But, nothing seems to have happened: the printouts are unaffected by

Programmatically set printer to bypass the windows spooler

吃可爱长大的小学妹 提交于 2019-12-10 14:55:33
问题 Is there a way to programmatically configure a printer that prints to a file (local file port) to bypass the spooler service and send the data directly to the file ? I have looked @ prnadmin.dll (nothing relevant there) and WMI (nothing relevant). Any ideas ? And no, I don't want to stop the print spooler service in Windows (XP SP3), just make the printer bypass it. 回答1: The PRINTER_INFO_2 structure has a parameter called PRINTER_ATTRIBUTE_DIRECT. You can get the handle to the printer using

Can I reprint a spool file?

守給你的承諾、 提交于 2019-12-01 05:21:37
Is there a way to reprint a spool file? I can't find any example or article to say if there is a way or not. edit: when i say reprint it, i mean to the same printer Yes you can. Read the complete SPL file into a byte array and have a look at this article: http://support.microsoft.com/kb/322090/en-us It shows you how to send raw data to a printer. Use that to send your byte array to the printer. Beware: a SPL file can actually contain various data types, such as EMF, PCL, ESC-P etc. Your must make sure that the format of the SPL file you have is appropriate for your specific printer. For EMF I

Can I reprint a spool file?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 04:26:25
问题 Is there a way to reprint a spool file? I can't find any example or article to say if there is a way or not. edit: when i say reprint it, i mean to the same printer 回答1: Yes you can. Read the complete SPL file into a byte array and have a look at this article: http://support.microsoft.com/kb/322090/en-us It shows you how to send raw data to a printer. Use that to send your byte array to the printer. Beware: a SPL file can actually contain various data types, such as EMF, PCL, ESC-P etc. Your

How to get the original full file path been printed by Spooler API

只愿长相守 提交于 2019-11-30 09:41:44
问题 I want to monitor the system scope's printing jobs through a standalone program using the Windows Spooler API, but only the print job's name can be fetched. How do I get the original file with full path. 回答1: If you are looking for the original document path (e.g. location of Word Document that you just printed), the spooler will not be able to tell you this. The spooler generally receives files through the GDI or XPS paths. The application that does the printing effectively sends the spooler

Monitoring Print Spool Without Using Interop/Unmanaged Code

吃可爱长大的小学妹 提交于 2019-11-30 03:57:04
问题 Background: I'm writing an application in C# using .NET 4.0. It prints a bunch of documents in a certain order. The documents are of all different types and are actually printed using ShellExecute with the "print" verb. To make sure the order doesn't get jumbled, I'd like to examine the print queue for the printer involved. My main loop would look like: Invoke "print" action on the document Wait for document to show up in print queue Repeat until done How Can I Monitor The Print Queue Using