Change printer spool data programatically

G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.print (More info?)

Hi,
I have a requirement as follows.
When somebody prints on a shared network printer, my program wants to
insert a text (say my name) extra at the beginning of the page or at the end
of the page while printing. How can I do that? Do I need to write a driver
level program? Any help will be appreciated.

Regards,

Krishnakumar
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.print (More info?)

This is not always possible. A "RAW" stream does not have page information.
Normally applications let the GDI negotiate the data type for the print job.
And GDI tries to negotiate it to EMF. In certain scenarios (like win9x to
nt) the data type cannot be EMF, it will be RAW. RAW is just a stream of
data in printer language. The best you can do with RAW is insert some text
before or after the print job.

Anyway, what you need to write is a print processor. Be aware there are many
printer drivers that come with their own print processor. They might not
work correctly if you replace their print processor with yours. You'd
probably have to invoke their print proc from yours.

Even this print proc solution is complicated. You need to read the emf
ercoreds for a page and insert emf recored for each page to draw your text.
This can be done easier if you write a printer driver, but that is very
complicated.

HTH

--
Felix Maxa
Windows Printing Team

This posting is provided "AS IS" with no warranties, and confers no rights.


"Krishnakumar N" <krish.kumar@m2comsys.com> wrote in message
news:%23KT3YJYwEHA.4004@TK2MSFTNGP10.phx.gbl...
> Hi,
> I have a requirement as follows.
> When somebody prints on a shared network printer, my program wants to
> insert a text (say my name) extra at the beginning of the page or at the
> end
> of the page while printing. How can I do that? Do I need to write a driver
> level program? Any help will be appreciated.
>
> Regards,
>
> Krishnakumar
>
>