This site uses advanced css techniques
In the process of developing a Windows printer driver, we ran into all kinds of problems with the Win32 Forms API. Our initial query work was done with our winprinfo tool, but eventually we needed a tool that could do more than just query: hence this program. Much more information on the background can be found in the Tech Tip: Managing Win32 Printserver "Forms".
Quick Links
The Windows NT4 printspooler defines about 40 forms, and the Windows 2000 printspooler defines more than a hundred, and they are accessed via the Forms API. The forms all have a name, a type, and dimensions to a thousandths of a millimeter. A bit of example output run on a Win2000 system is shown here:
C> winforms winforms 1.0.1 - 2003-10-19 - http://www.unixwiz.net/tools/ Querying printer "(local printserver)" Printer (local printserver) is open PRINTSERVER FORMS (121 forms, 7374 bytes) [ 0] B 215.900 279.400 mm Letter [ 1] B 215.900 279.400 mm Letter Small [ 2] B 279.400 431.800 mm Tabloid [ 3] B 431.800 279.400 mm Ledger [ 4] B 215.900 355.600 mm Legal [ 5] B 139.700 215.900 mm Statement [ 6] B 184.150 266.700 mm Executive ... more
NOTE - this is a console-mode tool: it must be run in an MS-DOS/command window. If you try to run it from Explorer, it will flash a window and exit. This is not a GUI tool. It also is almost certain not to run on Win9x/ME systems.
Both source and binary are available:
We promise that the binary was built from this source and that it performs no shenanigans. We don't promise that it has no bugs. Use at your own risk.
This code was built with Microsoft Visual C++, but strictly in the command-line mode, not using the IDE. In addition, the makefile requires GNU Make (gmake.exe) because we simply cannot stand Microsoft's NMAKE. You can get a GNU Make executable for Win32 here.
We built this to run strictly on NT/Win2000/XP platforms: if it works at all on Win95/98/ME, we'd be very surprised.
When winprinfo is run without command-line arguments, it reports a short "help" listing that summarizes the options available, which are expanded.
"name:type:width:height". type is either "P" for printer-form or "U" for user-form, and the dimensions are given in millimeters (which may include fractional parts).
This is a simple mirror of the revision log in our development environment, but it might lag a bit behind the version of the executable actually found on the web.
Sun Oct 19 17:18:36 PDT 2003 -- version 1.0.1 -- Initial release