Click here to Skip to main content
Licence 
First Posted 1 Nov 2004
Views 40,550
Bookmarked 13 times

Windows Printing using the Shell

By | 1 Nov 2004 | Article
This project describes how print files using windows programming

Introduction

We needed to have a way to perform batch printing of a list of files in windows.i was able to find a way to print non-imaging files (.doc,.xls.txt.pdf) usign the System.Diagnostics.Process function and passing the "Print" verb.However,I was having trouble to find a way to print images escpecially since XP does it using the Windows XP Photo Printing Wizard.

However,I finally found a very useful example project at MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/FotoVisionDesktop.asp).
"Photos are printed using the Windows XP Photo Printing Wizard . The wizard is implemented in the system file photowiz.dll but the custom interface is not exposed. Instead, the Windows Image Acquisition Library (WIA) from Microsoft is used that provides a COM wrapper for the printing wizard. The printing code is encapsulated in the Print class."

More information about the WIA library can be found at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wiaaut/wia/wiax/overviews/gettingstartedsamples.asp

The library can be downloaded and installed from http://www.microsoft.com/downloads/details.aspx?FamilyID=a332a77a-01b8-4de6-91c2-b7ea32537e29&DisplayLang=en

Though MSDN suggest the examples are in VB and scripting languages I was able to reproduce them in C#.

hope you enjoy it!!

Notes

  1. WIA imaging toolkit is available for developers who need to develop image-enabled applications for Windows ME and XP (Service Pack 1).The WIA Automation Layer exposes features in Windows XP Service Pack 1 or later to make it easy to acquire images on digital cameras, scanners, or web cameras, and to rotate, scale, and annotate your image files.
  2. Supported image formats include PNG, JPG, GIF, BMP and TIFF. These are defined by the FormatID Constants in the WIA library

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Supriya Angle



United States United States

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 1 Pinmembercrystalmac2:14 26 Jun '09  
GeneralMy vote of 1 PinmemberJacquers1:30 26 Jun '09  
QuestionHas anybody figured out where the "printprocess" class is? Pinmembercatchfire4:56 14 Jul '05  
AnswerRe: Has anybody figured out where the "printprocess" class is? Pinmemberrvdt0:03 13 Oct '05  
GeneralMore Information Pinsussbeatsunique11:02 20 Feb '05  
GeneralRe: More Information Pinmemberbenchva3:54 7 Apr '05  
GeneralRe: More Information Pinmemberbeatsunique11:56 7 Apr '05  
GeneralRe: More Information Pinmemberdevikta10:21 6 May '05  
GeneralRe: More Information PinmemberAndi Oliver Ion6:08 12 Aug '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 1 Nov 2004
Article Copyright 2004 by Supriya Angle
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid