Set Bin and duplexmode with TPDFPrinter

  • Hi,

    i have downloaded the evaluation version und had opend the delphi demo project. I need to set the bin and duplex mode, but it doesnt work. Here the code:

    var
    BinNane : WideString; // name of the Bin
    BinNo : integer; // total bins available
    curBin : integer; // number of current bin

    procedure TPDFPrinterForm.NextBinClick(Sender: TObject);
    begin
    if OpenPrinterCheck(printerName.Text) Then
    begin
    BinNo := myPrinter.GetBinCount('');
    curBin := curBin +1;
    if curBin > BinNo then curBin := 1;
    BinNane := myPrinter.GetBin(curBin);
    BinName.Text := BinNane;
    myPrinter.ClosePrinter;
    end;
    end;

    The value of GetBinCount is 0, GetBin is ??????????????????????

    So where are my mistakes?

    The printer is a canon iR2200 with 4 bins. So it should work.

    Thanks for answer.

    HGlaeser

    • Offizieller Beitrag

    Hi,

    currently there is no possibility to set the duplex mode, but using

    WPDFView.CommandEx(
    COMPDF_SelectPrinterBin0,
    xxx );

    You can select the paper bin for the document. The code to retrieve the numbers is not included in WPViewPDF (you seem to use a sepcial library for that)


    WPTools 5 uses this code to fill string list with names and numbers (in objects[])

  • Thanks for answer,

    but i want to use TPDFPrinter-component, because i dont need to view a pdf-doc. I just want to print it.

    So how can i set the bin, duplexmode, copies with TPDFPrinter? The sample-code doesnt work. the bincount is 0, the binname is ??????????????????. I have checked different printer models, even the same ???????????? as binname.

    Or is it a limitation of evaluation version of TPDFPrinter?

    • Offizieller Beitrag

    Allthough it is a good suggestion and I will probably add that shortly, there is currently no PDF printer component in the ViewPDF package.

    The wPDFPrinter component of the wPDF package is to create new PDF files.

    Currently You need to create a WPViewPDF component - it must not be invisible but it can be hidden on the form under a panel or off the screen.

    Julian Ziersch