Generic Printing Function

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?
 
T

Tim Sprout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top