multiple startdocs for multiple copies (universal printer driver rendering plugin)

Discussion in 'Windows Vista Drivers' started by martin, Feb 3, 2005.

  1. martin

    martin Guest

    Hai Everyone

    I am developing a printer driver based on Universal printer driver( a
    rendering plugin). But i am noticing some strange issues. The driver I
    have written is spewing multiple STARTDOCS ie if i select multiple
    copies...But ENDDOC is being called once. I have also noticed that
    the dwJobId parameter is valid (ie non zero value) only for the first
    STARTDOC.The others have dwJobId value as Zero. I have also noticed
    that MS Word spews multiple STARTDOCS evenif i have selected "number
    of copies" to 1. Can anybody tell me that if it is ok to ignore the
    startdocs with dwjobid as zero???. Also it seems that different
    applications are behaving differently with my driver( mainly with
    collate on and multiple copies).Is there any way that i could tweak my
    driver so that it works same with all the applications..

    Thanks in advance

    Martin
     
    martin, Feb 3, 2005
    #1
    1. Advertisements

  2. martin

    gary Guest

    typically i use the StartDoc as an initialization point such as issuing a
    "job start" command to our printer. at this point you can save a "job
    started"
    flag in your PDEV structure. next time you come into StartDoc check
    the flag to see if you have already entered and act accordingly. i've
    never relied on the dwJobId field, not to say you can't do it that way.

    if you stick a flag into your PDEV remember to copy it from the old
    PDEV to the new in OEMResetPDEV.

    as far as the copies/collate issue (and this is sketchy so you'll have
    to experiment) some applications will allow the spooler to replay the
    number of copies while other applications will reset the number of copies
    to 1 and print the document multiple times.

    also, you get different results if you have the *Collate feature present
    in the GPD than if you don't. having it present means that the printer
    must support the copies and collation.

    print a 2 page job with 5 copies (i think i did my tests with MS Word,
    results may be different with other applications) with the Collate box
    checked and unchecked. observe what happens to the devemode copies
    and copies field as well as how many times you go through OEMStartPage.

    now add *Collate to the GPD (if is already there take it out) and run the
    same tests and observe the differences.

    does the printer itself support copies (via a command). if so, these tests
    should indicate what you have to do.
     
    gary, Feb 3, 2005
    #2
    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.