Generic Printing Function

  • Thread starter Thread starter JL
  • Start date Start date
J

JL

I have a folder that can have different types of files in it, such as doc,
xsl, pdf, txt, etc. I need to write a program (thinking about a winForm app)
that periodically print all the documents in the folder.

Is there an easy way to accomplish this? Do I need to handle/code each file
type differently when printing?
 
Peter Duniho wrote:

If the documents are supported by a program that implements the DDE
"print" operation, then you should be able to treat all of those
documents the same. Otherwise, no...there's no standardized way to
command an application to print a document.

I'm not aware of any specific support in .NET for doing DDE commands,
but it's possible that with the appropriate arguments for the Process
class it would work. Otherwise, you'll probably have to use unmanaged
interop to send the appropriate command to the Windows shell.

Pete

I have used Brian Gideon's NDDE libray to print pdf's using DDE from C#:

http://www.codeplex.com/ndde

--Tim Sprout
 
Back
Top