Setting Paper Type (eg: Glossy) when printing  
Author Message
Andrew Mercer





PostPosted: Visual C# General, Setting Paper Type (eg: Glossy) when printing Top

Hi,

I have used, after useful suggestions from this forum, a very helpful piece of code (from the code project) that allows me to dynamically set printer settings individually for a print job and not change the users/global settings for that printer.

However as usual I am looking for a little bit extra.

Does anyone know whether the Paper Type available for a printer can also be set

Most printers allows settings such as Glossy, Heavy Glossy etc...This is useful depending on what is being printed etc. For example a photo may need to be printed on Glossy rather than plain paper.

This may require the user ensuring the correct paper is loaded at print time (that is acceptable) but it would be helpful to set this value and not alter the global settings (same as I have done with Duplex).

Searching the web shows others are looking for the same functionality - however so far I have not found the solution.

Any suggestions greatly appreciated.

Thanks Andrew




Visual C#18  
 
 
ahmedilyas





PostPosted: Visual C# General, Setting Paper Type (eg: Glossy) when printing Top

this is handled by the printer driver and is configurable via the Print dialog printer settings. I can't seem to find a way to directly access the paper type property however

 
 
Glenn Block MSFT





PostPosted: Visual C# General, Setting Paper Type (eg: Glossy) when printing Top

You should be able to access these settings using printer windows api calls and the DevMode print structure. The following link points to some code that defines the structure, and shows using the SetPrinter api to configure the printer. You'll need to play around with this code, but you should be able to figure it out. I've used these APIs many times in the past for performing such tasks from VB6.

https://secure.codeproject.com/dotnet/NET_Printer_Library.asp print=true