c# - I need to add a custom form size to the local Print Server through code -


i need add custom form size local print server through code. in bat file or in c#, or possibly in else can run when running installshield installer.

to better explain, manually, open devices , printers , click on printer. click print server properties. form below open, , can view/add/delete forms. add new 1 here through code (then select new paper size in printers advanced options).

enter image description here

this code project article explains how it, , presumably has helper classes , methods. sample code below:

var forminfo = new forminfo1(); forminfo.flags = 0; forminfo.pname = papername; // sizes in 1000ths of millimeters forminfo.size.width = (int)(widthmm * 1000.0);  forminfo.size.height = (int)(heightmm * 1000.0); forminfo.imageablearea.left = 0; forminfo.imageablearea.right = forminfo.size.width; forminfo.imageablearea.top = 0; forminfo.imageablearea.bottom = forminfo.size.height;  // add paper size printer's list of available paper sizes: bool bformadded = addform(hprinter, 1, ref forminfo); 

http://www.codeproject.com/articles/12229/adding-custom-paper-sizes-to-named-printers


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -