Hi,
Am using WP Version 4 and I am having problems duplex printing from multiple printer trays.
Basically, I want the first page to print out on Headed Paper, the second page to print on the back of the headed paper and all subsequent pages to print from another tray front and back on blank paper.
I have attempted a number of ways but I am having no luck.
I have the printer set to duplex by default.
Here is some code that was one of my attempts:
Code
vPrintTrays := TStringList.Create;
wprtLetter.PrintParameter.GetPaperBins(vPrintTrays);
wprtLetter.PrintParameter.FirstPagePaperSource := Word(vPrintTrays.Objects[vPrintTrays.IndexOf('Cassette 2')]); //Headed Paper
wprtLetter.PrintParameter.AllPagePaperSource:= Word(vPrintTrays.Objects[vPrintTrays.IndexOf('Cassette 2')]); //Headed Paper
wprtLetter.PrintParameter.PageRange := wprPageList;
if (wprtLetter.CountPages > 1) then
wprtLetter.PrintParameter.PageList := '1,2'
else
wprtLetter.PrintParameter.PageList := '1';
wprtLetter.Print;
if (wprtLetter.CountPages > 2) then
begin
wprtLetter.PrintParameter.PrintOptions := [];
wprtLetter.PrintParameter.FirstPagePaperSource := Word(vPrintTrays.Objects[vPrintTrays.IndexOf('Cassette 1')]); //Blank Paper
wprtLetter.PrintParameter.AllPagePaperSource:= Word(vPrintTrays.Objects[vPrintTrays.IndexOf('Cassette 1')]); //Blank Paper
wprtLetter.PrintParameter.PageRange := wprPageList;
wprtLetter.PrintParameter.PageList := '3-'+ IntToStr(wprtLetter.CountPages);
wprtLetter.Print;
end;
Alles anzeigen
(wprtLetter is a TWPRichText Object)
In this situation printing a three page document ends up on 3 seperate pages, the first two headed and the last blank.
Any help would be much appreciated.
Curtis