stop printing from a filter

is it possible to stop the printing from an xps filter?

would a call toRequestShutdown be the proper way to cancel the printing?

[307 byte] By [digitalmercenary] at [2008-1-10]
# 1

Hi,

For graceful cancelling of job call to IPrintPipelineManagerControl->FilterFinished() is required.Only if any ProcessPart() fails,manual shutdown is called using IPrintPpelineManagerControl->RequestShutdown().

Regards,

Sivakami V

sivakami at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...
# 2
Also when you cancel a print job,ShutDwnOpeartion() is called setting bool flag m_bShutDown to true.
sivakami at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...
# 3
which class is ShutDwnOperation() defined in?
digitalmercenary at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...
# 4
Let me rephrase my question:

If I call IPrintPpelineManagerControl::RequestShutdown(), would that mean that

a. the whole filter pipeline will be stopped and the printing job will be cancelled?

or

b. only this particular filter will be canceled

digitalmercenary at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...
# 5

In WDK 5384, \src\print\SimplePipelineFilter\XPSFilter.cxx,Line no:546.

Put a breakpoint and debug so that when you cancel the job,the breakpoint is hit and m_bShutDown flag is set true.

sivakami at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...
# 6
oh that. Thats the implementation for IPrintPipelineFilter::ShutdownOperation . i don't need to know about that. nor about setting flags for that class' internal use.

thanks anyway.

digitalmercenary at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...
# 7

Hello,

RequestShutDown() will request for a pipeline shutdown.No further processing of filters are done.Pipelinemanager doesnot call other filters.It gets shutdown and process if finished.But if FilterFinsihed( is called,this indicates particular filter is finished and gracefully exited so that pipeline manager can further load other filters for processing.

For cancelling a job and to stop spooling,RequestShutDown() can be called if no further filters is to be called.

Thanks,

sivakami V

sivakami at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...
# 8
thanks.
digitalmercenary at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...
# 9

Hi,

Did you find someother way of cancelling the spool job or print job?

Thanks

sivakami at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...
# 10
from microsoft, they suggested calling SetJob to cancel the print.
digitalmercenary at 2007-10-3 > top of Msdn Tech,Software Development for Windows Vista,XML Paper Specification (XPS)...

Software Development for Windows Vista

Site Classified