WPCubed Product Support

AllPagePaperSource - Printing doesn't respect tray selection

I've been having some difficulties getting an editor to print it's contents to a different printer tray (bin).

We are currently using 5.20.8, D2005. I have this code:

Editor := TWPCustomRichText.CreateDynamic;
Editor.CheckHasBody();

... add some text to editor here...

Editor.PrintParameter.AllPagePaperSource := 3; //Tray 3
Editor.Print();

Every time, the page is printing to the default printer tray in our case -- Tray 2 (not Tray 3). It doesn't matter what Tray I'm selecting and assigning to the "AllPagePaperSource", the page is coming out on Tray 2.

Am I missing some code? I looked at the PrinterSetup demo it wasn't immediately obvious that we were missing any steps. Do we need to call another method to synchronize the PrintParameters with the TPrinter object?

#1 ♥ 0
2.8k Views 2 users read 1 min
support

Hi,

the trays usually have special ids, not just numbers. You can use the method

procedure GetPaperBins(aPrinter: TPrinter; list: TStrings;
FirstName: string = '');

to fill a strig list with paper tray names. The ID will be saved in the Object[] array of the string list.

Julian

#2 ♥ 0
This category is archived. No new posts are possible.