Fun with printing

Started by
6 comments, last by eq 16 years, 3 months ago
I need help with two things: 1) I need to print a report to file. The report was built by a custom-built program (not my own), and I do not have any access to that program's source code or the database it uses. When I use the regular XPS file printer, it gives no error message, but the file is completely blank. I installed a Windows generic driver that prints to PS/TXT file, but those also output blank files. However, printing to file works fine with XPS/PS/TXT when using any other program (notepad, etc). Also, I can print to any "normal" printer with this software. Basically, the software I'm working with is junk, but there is no other alternative and I have to work with it. 2) I need to be able to have the computer automatically run a program right after using a certain printer. Can this be done?
Advertisement
I could not parse what you said for 1) very well, nor do I see how it is relevant to what you said and asked about in 2).To answer the question wether this is possible, I am sure this is possible to be done as it is done for programs that start a program that tell the status of the target or document printed after completed.I am not familiar with how do this however...

I still do not understand what you are getting at for what you said about 1), could you rephase it possibly?




Thanks...

To rephrase 1),

I need to use the Windows XPS file printer, but it's not working for one specific program. After getting it working, I want to be able to print with it, and then have it automatically run a program.
When you say "I need to use the Windows XPS file printer, but it's not working for one specific program", I am assuming you mean you mean the printer does not print when done using one specific program; so you want to print a file with a specific program and then open another one when the file is printed? If so, I am not quite sure how you would do this, but I don’t know if their is a way using like Win32 to obtain the current printed files status and when the specific file you would have to give to this program is done printed, you could have it open another program. I have found a link to a site relating to some code that obtains some printer information using some win32 code. If I hope you understand basic win32 and basic c concepts like structures and classes and pointers, as it uses these and some of these simple c\c++ essentials.

How to get the status of a printer and a print job:

http://support.microsoft.com/kb/160129


Hoped that helped

Mad_Coder
The XPS printer does not print to a real physical printer, it prints to a file on the hard drive. So, I want to be able to print to a file, and then have it automatically run a program that reads in that file.

However, when I use the XPS printer using a certain program, it makes blank pages within the XPS document.
Does it print blank documents, or the correct document with additional spaces/lines? If this is the case, you might be able to write a simple program to tidy up the generated files?
It generates the correct number of pages, but they are all completely blank.
Are the normal print-outs black and white or color?

If it's B&W the case may be that the printed pages isn't blank but the color of the "ink" is wrong (white I assume).

Maybe the default color for the xps printer is wrong or more likely the program simply sets the color to white but your other printer drivers ignores this "insane" command and still prints it as black.

I don't know the xps file format but maybe you could parse the file to see if there's any data in it (the file size might be an indicator if there's data in the file).


Try another print to file driver like CutePdf writer (free .pdf printer driver) and see if you get something.

This topic is closed to new replies.

Advertisement