
#.SRT VIEWER PORTABLE#
Since pretty much every application has a print function, the EMF spool file can serve as a quick and dirty portable document format (though much less featured than a PDF). Zoom out reduces the size of the preview.Properties = Brings up a dialog with the properties of this page.Goto - Goes directly to the selected page.Last Page - Goes to the end of the document.


#.SRT VIEWER CODE#
(I have included some samples with this application code as well.) These are typically held in your $winnt$\System32\spool\ directory. A dialog box will appear to allow you to browse to the spool file (extension. To view an EMF spool file, select the menu File -> Open. This signifies the end of the spool file records. The DEVMODE structure holds details such as the number of copies, the page orientation (landscape versus portrait), the paper size and paper source, and so on. This record contains the device settings that apply to the rest of the pages in the document (or until another DEVMODE record is encountered that overrides it). The EMF header record gives you the dimensions of the boundary rectangle (the area inside the print margins), the number of graphics records that make up the page, and the file size of this single EMF page. This record contains a Windows standard enhanced metafile, consisting of an EMF header and one or more EMF graphics record structures. Of these, the most important record types are: SRT_PAGE SRT_EXT_PAGE = &H14 ' 20 Enhanced Meta File? End Enum

SRT_EXT_FONT_SUB2 = &H13 ' * 19 Ext Font Data (SubsetFont 2) */ SRT_EXT_FONT_SUB1 = &H12 ' 18 Ext Font Data (SubsetFont 1) */ SRT_EXT_FONT_MM = &H11 ' 17 Ext Font Data (Multiple Master) SRT_EXT_FONT2 = &H10 ' 16 Ext Font Data */ SRT_PAGE = &HC ' 12 Enhanced Meta File (EMF) */ SRT_FONT_SUB2 = &H8 ' 8 Font Data (SubsetFont 2) SRT_FONT_SUB1 = &H7 ' 7 Font Data (SubsetFont 1) */ SRT_FONT_MM = &H6 ' 6 Font Data (Multiple Master) */ The spool file is composed of the following record types: The file layout of an EMF spool file is not officially documented by Microsoft, but the newly released documentation reveals that it is a series of enhanced metafile records (one for each page) and a number of other record types which are specific to the business of printing these pages. Usually, this spool file is held in the raw printer page definition language (which could be PCL, PostScript or one of many other options) but in Windows NT, 2000, XP and 2003, it is possible to make the spooler use a different, more device independent format known as an EMF spool file.

This speeds up the print process as control can return to the application before the printer has finished printing the document.
#.SRT VIEWER DRIVER#
When an application sends pages to a printer, they are held in an intermediary file which the application can write to and the printer driver can read from simultaneously.
