Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Print To Different Tray/Bin Not Working
  FAQ FAQ  Forum Search   Register Register  Login Login

Print To Different Tray/Bin Not Working

 Post Reply Post Reply
Author
Message
m_alam View Drop Down
Team Player
Team Player
Avatar

Joined: 02 Aug 11
Location: Bangladesh
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote m_alam Quote  Post ReplyReply Direct Link To This Post Topic: Print To Different Tray/Bin Not Working
    Posted: 13 Sep 22 at 1:18AM
Greeting,

i am trying to print to different tray/bin..

i have tried to set paper tray number using following code:
objRPDF.SetupCustomPrinter(strPrinterConfig, 9, Convert.ToInt32(PrinterTrayTextbox.Text)); // REM Printer Tray/Bin

my printer has 4 trays.. i tried 1 to number 4 that didn't work..

so, i made a demo tool to list the printer trays, but strangely it shows same trays number for most of my printers :(


but still when i try to print tray 15 and 257 (using 1st printer name), both print to same/default tray :(

and more strange is that the 2nd printer on the list only have 1 tray, but qpl also shows same trays number for that one too? :(

so? what i am doing wrong here?

thanks in advance for upcoming help

best regards
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3454
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 13 Sep 22 at 10:16PM
Hi Hassan,

To check about the real printer names i use:
GetPrinterNames.
To check about existing printer bins i use:
GetPrinterBins.

Doing the output the following syntax should help:

if ( prname = 'default' ) Then
     PriName := QP.GetDefaultPrinterName;

if ( prname <> 'default' ) then
     PriName := prname;

// . . .

propt := QP.PrintOptions(pscal, rotate, fname);
            
if ( bin > 0 ) Then
  begin
    cPriName := QP.NewCustomPrinter(PriName);
    QP.SetupCustomPrinter(cPriName, 9, bin);
  end;
            
if ( pend = 9999 ) then
  pend := pc; // pagecount
  for i := 1 to copies do
    begin
      if ( bin > 0 ) Then
        QP.PrintDocument(cPriName, pstart, pend, propt)  // with bin
      else
        QP.PrintDocument(PriName, pstart, pend, propt);  // without bin
    end;

Cheers,
Ingo

Back to Top
m_alam View Drop Down
Team Player
Team Player
Avatar

Joined: 02 Aug 11
Location: Bangladesh
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote m_alam Quote  Post ReplyReply Direct Link To This Post Posted: 14 Sep 22 at 12:50AM
Originally posted by Ingo Ingo wrote:

Hi Hassan,

To check about the real printer names i use:
GetPrinterNames.
To check about existing printer bins i use:
GetPrinterBins.

Doing the output the following syntax should help:

if ( prname = 'default' ) Then
     PriName := QP.GetDefaultPrinterName;

if ( prname <> 'default' ) then
     PriName := prname;

// . . .

propt := QP.PrintOptions(pscal, rotate, fname);
            
if ( bin > 0 ) Then
  begin
    cPriName := QP.NewCustomPrinter(PriName);
    QP.SetupCustomPrinter(cPriName, 9, bin);
  end;
            
if ( pend = 9999 ) then
  pend := pc; // pagecount
  for i := 1 to copies do
    begin
      if ( bin > 0 ) Then
        QP.PrintDocument(cPriName, pstart, pend, propt)  // with bin
      else
        QP.PrintDocument(PriName, pstart, pend, propt);  // without bin
    end;



that's what exactly my code does, though in different language.. but it just not working :(


Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3454
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 14 Sep 22 at 7:21PM
not really "exactly" cause my code works for me ;-)

Cheers,
Ingo

Back to Top
m_alam View Drop Down
Team Player
Team Player
Avatar

Joined: 02 Aug 11
Location: Bangladesh
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote m_alam Quote  Post ReplyReply Direct Link To This Post Posted: 17 Sep 22 at 3:09AM
Originally posted by Ingo Ingo wrote:

not really "exactly" cause my code works for me ;-)



            strPrinterConfig = objRPDF.NewCustomPrinter(PrinterName);
            objRPDF.SetupCustomPrinter(strPrinterConfig, 1, 0); // REM custom paper size
            objRPDF.SetupCustomPrinter(strPrinterConfig, 2, intHeight); // REM custom paper height
            objRPDF.SetupCustomPrinter(strPrinterConfig, 3, intWidth); // REM custom paper width
            objRPDF.SetupCustomPrinter(strPrinterConfig, 5, 1); // REM quality 1 = high, 2 = medium, 3 = low, 4 = draft, Or Exact DPI
            objRPDF.SetupCustomPrinter(strPrinterConfig, 6, 2); // REM Color 1 = monochrome, 2 = Color
            objRPDF.SetupCustomPrinter(strPrinterConfig, 9, Convert.ToInt32(PrinterTrayTextbox.Text)); // REM Printer Tray/Bin
            objRPDF.SetupCustomPrinter(strPrinterConfig, 11, PageLayout); // REM 1 = portrait, 2 = landscape

that is the code i am using to setup printer tray, what i am doing wrong here? can you please tell me?

thanks in advance

best regards
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store