Home All Groups Group Topic Archive Search About

Q) Printing: Intercept / Override Controls' Print Behavior

Author
14 Feb 2006 7:21 PM
Jonathan Nix
Suppose you have a control that prints a series of pages... How would you
intercept the printing in order to augment it with page numbers, the page
count, etc.. Or to take that output and generate a PDF from it, or to create
a 'printed image', etc.?

Would you trap specific messages, such as WM_PRINT, and manipulate the data
while the control is printing, or how would you go about doing it?

What I am trying to accomplish, is with the WebBrowser control, to intercept
and manipulate its print output... More than just adjusting the print
template or header information. I need to do things like insert page breaks,
add customized headers and footers after all the pages are generated.

This would also essentially facilitate rendering HTML into an arbitrary
medium, so it won't be necessary to re-implement an HTML processor. People
should just use IE to accomplish that.

Any help is greatly appreciated.

Please CC:   darren  at  cs . pdx . edu
in your reply, thanks.

- Jonathan

AddThis Social Bookmark Button