Printer Driver --- Is there a way I can know if "Print to file" is been checked or not?

Discussion in 'Windows Vista Drivers' started by Zhendong Wu, Jun 17, 2005.

  1. Zhendong Wu

    Zhendong Wu Guest

    Hi all,

    In my Windows XP/2k printer driver(user mode), I need to check if "Print to
    file" is been checked or not.
    I did some test that checking
    DrvDocumentEvent->DOCUMENTEVENT_STARTDOCPRE->pDocInfo->lpszDocName,
    but I can not get the inf. about "Print to file".

    If "Print to file" is been checked, I must send data to my printer only.
    If "Print to file" is not been checked, I need read some inf from my
    printer, then send data to it.

    Is there a way I can know if "Print to file" is been checked or not?

    Thanks a lot!

    Zhendong Wu
     
    Zhendong Wu, Jun 17, 2005
    #1
    1. Advertisements

  2. Zhendong Wu

    Zhendong Wu Guest

    Sorry for my wrong explanation.

    If "Print to file" is been checked, the data is been sent to the file.
    If "Print to file" is not been checked, I need read some inf from my
    printer, then send data to it.

    Thanks a lot.

    Zhendong Wu
     
    Zhendong Wu, Jun 17, 2005
    #2
    1. Advertisements

  3. Zhendong Wu

    Zhendong Wu Guest

    I found the way to confirm Is there a way I can know if "Print to file" is
    been checked or not?
    Checking DrvDocumentEvent->DOCUMENTEVENT_STARTDOCPRE->pDocInfo->lpszOutput

    If "Print to file" is been checked, lpszOutput is the file name.
    If "Print to file" is not been checked, lpszOutput is PortName(example:
    LPT1)

    Thanks

    Zhendong Wu
     
    Zhendong Wu, Jun 17, 2005
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.