I'm collecting large/huge EMF spool files, which are usually generated printing from CAD/CAM/GIS applications. Here are some restrictions:
1) Single page. It's always possible to print lots of pages to generate a huge spool file.
2) Recent version of applications. Old applications may just be silly in generating EMF spool file.
3) Real applications, real documents. It's always possible to copy/paste a medium complex page to generate a very complicated page.
4) EMF spool file, not raw printer data. emf.exe from www.fengyuan.com\download should be able to open EMF spool file.
I usually install a printer driver to LPT2, print to it, and then go to the spooler folder to harvest the EMF spool file (system32\spool\printers).
Thanks
After several years, www.fengyuan.com finally gets a new look. This time, I hired someone to do it for me, 2.5 hours, $5 per hour, for a total cost of $12.5. Like every designer, he left a mark on my website, qc.fengyuan.com.
PS. I finished the blog on new Longhorn printing architecture: http://blog.joycode.com/fyuan/posts/20849.aspx
At WinHEC today, Microsoft unveiled details about a new printing architecture based on Longhorn's Avalon technology. It is a long time dream coming true for lots of people familar with Windows printing system. The same is true for me as I worked for four years on Deskjet printer drivers for HP, and three years for Microsoft on GDI, GDI+ and Avalon.
Here is a summary of the differences between the new and old printing architecture:
1) Double precision coordinate system. GDI on Win9X uses 16-bit coordinate system internally, GDI on NT-based systems uses 28.4 fixed point coordinate system internally, GDI+ uses single precision floating number. None of them is good enough for large size, high resolution application. Finally, Avalon changes to use double precision floating point numbers.
2) Well documented spool file format. GDI uses EMF as the basics for its spool file format. But the exact file format used is not documented and it even changes from version to version. Longhorn will support a new well documented spool file format, which is based on a subset of XAML, the markup language for Avalon. The Avalon printing system will convert contents into this subset of XAML and write to the new spool file, which can then be consumed by printer drivers, filters or devices capable of processing it. Versioning strategy and digital rights management are built in into the format.
3) Independence from GDI, DDI world. The Win32 printing system is tightly coupled with the GDI, DDI interface designed initially for display devices. Higher level GDI commands are broken down into lower level DDI commands originally designed for dump display devices. Even work group printers have to receive data through this narrow channel. Although starting from Windows 2000, user mode printer drivers are supported, rendering calls are still passed to kernel mode first before being thunked back to user mode printer driver. GDI+ does not have its own printer driver mode, so it just converts GDI+ primitive to GDI commands. Longhorn's printer driver will be based on managed code. Now printer driver is finally away from the driver mode designed for display devices. Printer drivers will be hosted in a managed process with each print queue having its own application domain, isolating bad drivers from good ones.
4) Open filter-based printer driver architecture. In the Win32 world, the first stage of printer driver is actually EMF print processor. But EMF print processor is not given direct access to EMF spool file, instead it's being fed with contents. EMF print processor also does not have direct control over the real printer driver. The real printer driver is a DDI-based driver which only receives one DDI commands at a time. More sophistated printer drivers have to save all DDI commands to a file and implement multi-stage conversion for high quality output. The new printer driver is just a chain of filter, each having directly access to spool files. Printer vendors can implement print processor like features, logging, archieving, page analysis, real conversion within the same framework. There will be lots of opportunity for innovation.
5) Consistent and extensible settings. Printing settings are kept in DEVMODE in Win32 world. But the DEVMODE mode structure was originally designed for 16-bit world so it has lots of limitation. One example is that paper size is limited to 16-bit integers. So printer vendors has to extend DEVMODE by adding data to private DEVMODE which no one else can understand. In the driver UI, there are several property sheet pages which are maintained by printer drivers according to private DEVMODE. There are lots of confusion and inconsistency between public and private settings. In Longhorn, DEVMODE is replaced with PrintTicket, an XML stream which holds all printing related settings. Printer vendors can extend it in a predefined way such that application, print UI can understand them. PrintTicket can be attached at job, document or page level for different levels of control.
6) ScRGB color space. Longhorn printing system will support ScRGB color space, CMYK color space, named color and spot colors, on top of sRGB support. In ScRGB color space, each color channel is represented using single precision floating point number using gamma of 1.0.
7) Smaller spool file size. When applications want to implement advanced graphics features like gradient fill and transparency, EMF spool file can grow to unmanageable size when they are broken down into GDI primitives. Other draw back of EMF spool file is that it does not allow compressed bitmap, unless the printer driver supports PNG and JPG pass-through; and it does not allow reuse of bitmaps. XAML-based spool file can natively represent gradient fill, transparency and different types of image formats. This translates to smaller spool file size and better performance.
8) Improved printing quality. Out of box, Longhorn will support all existing printer drivers on the market through a special built-in conversion path which translates Avalon context into GDI contents. This conversion path will provide far better printing quality than GDI+ implementation currently used by Office and .NET/WinForm applications. Further printing quality improvement can be achieved by implementing full-fledged Longhorn printer drivers.
At the end of MVP Summit last month, I had the honour of taking the Chinese MVPs on a short tour of Microsoft main campus. They visited my new office, which has a nice view of Lake Bill. Lake Bill is a tiny articifial lake centered by the oldest buildings in Microsoft. It's connected with lots of history of Microsoft.
The MVPs took quite a few pictures at Lake Bill. Now new lifes are coming to Lake Bill, so it's worth another look: http://www.fengyuan.com/lakebill/.
Happy Holidays.
P.S. I have been busy on CSDN recently.