Paper Bins not going back to default

  • Using WPTools 5:

    We print a letter where we set the FirstPagePaperSource to Tray 2 and printed.

    Then the user exits our letter module and then goes to our contract module. They open up a contract and tell it to print (without selecting trays). It prints to Tray 2 AGAIN.

    Now with WPTools v4 this did not happen to us... the bins appeared to alwasy go back to defaults. But with WPTools 5 it appears to remember these settings and prints to the same tray.

    Is there a way to reset the bins back to defaults or is there a particular practice that should be done in the way printing and bins are used??

    When we exit the whole application and come back in everything is back to defaults.

    Thanks,

    Greg

  • I'm not trying to be pushy, but we have been dealing with this about 7 days now I am at a lost as how to get this working. We didn't have the problem in v4, but going to v5 the problem now exists.

    Thanks

    • Offizieller Beitrag

    Hi,

    >>Is there a way to reset the bins back to defaults or is there a particular practice that should be done in the way printing and bins are used?? <<

    In WPCtrMemo.pas I am using this code:

    if (FPrintParameter.FirstPagePaperSource <> 0) or
    (FPrintParameter.AllPagePaperSource <> 0) then
    include(ChangeFields, wpPaperTay);

    I guess when you comment out the if statement it will always do it like V4.

    Julian

  • Hey Julian,

    Basically we want it to work like MS Word. Each document seems to have control over the printer and even though you set the first and second page on one word document the other document open at the same time (which didn't have the trays set) just use the default trays.

    In the same way when we print a letter our of our letter module where we set the trays we want a documetn out of our contract module to print either using the default trays or the trays selected within it's printing mechanism.

    Will doing the above achieve this?

    Is there another way of doing this without altering your source code?

    Thanks for your help.

  • I think we may have found something. The paper size was remaining the old size and the printer was ignoring the bin change request. We added the following code to WPCTRMEMO.PAS to correct:

    if PaperDEF >= 0 then
    begin
    (* was: if DevMode^.dmPaperSize <> PaperDEF then
    begin
    DevMode^.dmPaperSize := PaperDEF;
    DevMode^.dmFields := DevMode^.dmFields or DM_PaperSize;
    Changed := TRUE;
    end; *)
    if DevMode^.dmPaperSize <> PaperDEF then
    begin
    DevMode^.dmPaperSize := PaperDEF;
    //DevMode^.dmFields := DevMode^.dmFields or DM_PaperSize;
    DevMode^.dmPaperWidth := Round(WPTwipsToCentimeter(pw) * 100);
    DevMode^.dmPaperLength := Round(WPTwipsToCentimeter(ph) * 100);
    DevMode^.dmFields := DevMode^.dmFields //added all 3 parameters to force paper size change
    or DM_PAPERSIZE or DM_PAPERWIDTH or DM_PAPERLENGTH;
    Changed := TRUE;
    end
    else if (Abs(DevMode^.dmPaperWidth -


    This fixed our problem with the upgrade to WPTools5

    Randy