/// <summary>Windows GDI DOC_INFO_1 structure</summary>
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
private class DOC_INFO_1 {
/// <summary>Document name</summary>
[MarshalAs(UnmanagedType.LPStr)] public string pDocName;
/// <summary>output file name (or NULL for a printer)</summary>
[MarshalAs(UnmanagedType.LPStr)] public string pOutputFile;
/// <summary>data type</summary>
[MarshalAs(UnmanagedType.LPStr)] public string pDataType;
}
<StructLayout(LayoutKind.Sequential)> Private Class DOC_INFO_1
<MarshalAs(UnmanagedType.LPStr)> Public pDataType As String
<MarshalAs(UnmanagedType.LPStr)> Public pDocName As String
<MarshalAs(UnmanagedType.LPStr)> Public pOutputFile As String
End Class
How To send raw data to a printer:
http://support.microsoft.com/default.aspx?scid=kb;en-us;322091
Used in conjunction with the GDI StartDocPrinter function