请问打印机驱动的流程是什么样的?
也就是打印一份文件时如word文档,首先把这个文件转变成干什么,然后再干什么,或者谁知道哪里有这方面的资料?麻烦告诉我一下,谢谢!

解决方案 »

  1.   

    The preceding figure shows the interaction between kernel-mode GDI and the printer graphics DLL after CreateDC is called. When an application calls the CreateDC function to create a printer device context, GDI checks to see if the appropriate printer graphics DLL is loaded. If it is not, GDI loads the DLL and calls the DrvEnableDriver function in the DLL. The function is not called again unless the driver is reloaded. 
    Next, GDI calls the printer graphics DLL's DrvEnablePDEV function so the driver can create a physical device instance and return device characteristics. GDI uses the returned information to create an internal description of the device instance. 
    GDI then calls the graphics DLL's DrvCompletePDEV function to supply a GDI handle to the device instance. The graphics DLL must use this handle as input to some of the Eng-prefixed callbacks provided by the GDI drawing engine (see GDI Support Services). 
    After GDI receives the device instance handle, it then makes a call to the graphics DLL's DrvEnableSurface function, which sets up the surface for drawing, and associates it with the physical device instance. 
    The driver can create a drawing surface for the device instance by calling EngCreateBitmap. Alternatively, if the drawing surface is device-managed, the driver can call EngCreateDeviceSurface. 
    If EngCreateBitmap cannot supply a bitmap large enough to contain an entire physical page, and if the driver supports page banding, EngMarkBandingSurface can be called to inform GDI that banding will be employed. 
    Finally, the EngAssociateSurface must be called to allow GDI to associate the created surface with a specified device instance, and to let GDI know which driver-supplied graphics DDI drawing functions (if any) it should call when it draws on this particular surface. 
    At this point, a drawing surface has been created and rendering can begin. For each document to be rendered, GDI calls the following functions in the printer graphics DLL:DrvStartDoc
    For each physical page {
        DrvStartPage
        DrvStartBanding
        For each banding surface {
            DrvQueryPerBandInfo
            Rendering operations
            DrvNextBand
        }
        DrvSendPage
    }
    DrvEndDoc
      

  2.   

    最好的资料就是DDK的联机帮助:
    Display and Print Devices -> Design Guide -> Printer Drivers and Spooler Components -> Printer Driver Architecture
      

  3.   

    通过查找资料我已经对虚拟打印机了解的差不多了,我想问一下各位大侠:为什么我只能打印Word中得那个折线区域以内的部分,就是每张纸的边界处的空白不能打印出来,请问这是为什么?在这里特别感谢楼上的那位大哥给我拷贝的这些资料。
      

  4.   

    我得意思是当把Word中的左边距和右边距都往页面边界处拖动,也就是和边界的距离很小时(这样可以增大页面中存放的内容信息量),但在这个时候靠近页面边界处的字体就打印不出来了。是把页面保存为emf文件时出的问题还是再在emf保存为tiff文件时出的问题,大家给出出主意,我实在是没辙了。怎么改呢?