Tray selection when printing

Hello,
I'm using the folowing code to select a printer I want, and later I use this priner to print a document.
services3 = PrintServiceLookup.lookupPrintServices(null, null);
AttributeSet aset3 = new HashAttributeSet();
aset3.add(new PrinterName("\\\\SSBE107208\\" + printerName, null));
services3 = PrintServiceLookup.lookupPrintServices(null, aset3);
I actually need to select the right tray in my java program. Is this possible??

hi,
Did u find out how to select the required tray?
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(MediaTray.BOTTOM);
doesnt seem to work..it always selects from the default tray. I am trying to print to Brother HL6050DN printer and must select the bottom tray for printing. If u had found a way to select the tray, can u share it here?
Message was edited by:
rkveena

Similar Messages

  • Tray selection of printer doesn't work with printing order confirmation

    Hello,
    When we try to print output for the order confirmation document (BA00 and custom ZBA0) on a different paper tray (e.g. tray 2 for printer avbekyo-01_tray2 in SAP R/3) then the ouput is printed to tray 1 in stead. We have defined two different printers in SAP for the tray selection. We tested the ouput on different printers, besides the avbekyo-01 and went wrong on the others also. When we print out an invoice (ZRD0) to the printer on the second tray, the invoice is printed correctly from the second tray. With an ABAP developer we debugged the print process, but no code leads to the fact that the output for the order confirmation should be printed to the first tray, while the second tray was selected in the output record. In the code still the second tray is processed, but printed on the first. The only difference we can find is that the order confirmation is SAPScript and the invoice is a Smartform. Does anyone know a solution?.
    Kind regards

    Unfortunately the setting doesn't resolve the problem. We also have activated the settings of Tray2 in the option Tray Info.
    Edited by: Chantal Polman FUNC ACCOUNT on Jun 4, 2008 2:32 PM

  • Smart form dynamic tray selection on printing

    Hi Experts,
    I have a requirement in smart form that need to output the a particular invoice to a particular tray a printer. For e.g. tray 2.
    I have added TRY02 to the resource name of the pages in the smartform, but still the invoice is being printed to the default tray of the printer.
    I have done a test to that printer by printing the SAPCRIPT-TRAYTEST from SO10, and the output is being printed correctly i.e. to the different trays. So I guess the printer has been configured correctly.
    Is there any additional configurations that need to be done for smart forms for the tray selection works correctly? And, is it correct the way I implemented the functionality in the smart form?
    Can someone help please?
    Thanks in advance
    Regards,
    Zaheed

    Hi Experts,
    I have a requirement in smart form that need to output the a particular invoice to a particular tray a printer. For e.g. tray 2.
    I have added TRY02 to the resource name of the pages in the smartform, but still the invoice is being printed to the default tray of the printer.
    I have done a test to that printer by printing the SAPCRIPT-TRAYTEST from SO10, and the output is being printed correctly i.e. to the different trays. So I guess the printer has been configured correctly.
    Is there any additional configurations that need to be done for smart forms for the tray selection works correctly? And, is it correct the way I implemented the functionality in the smart form?
    Can someone help please?
    Thanks in advance
    Regards,
    Zaheed

  • HT204135 paper selection when printing

    On my last computer, when I went to print a job, I was able to communicate with the computer and printer and let it know that I was using a certain quality of paper, whether it be glossy, matte or something like standard. How come that option isn't available for me now on my MAC? I have an Epson R220 printer if that helps.

    The option should be available in the print dialog. When you select to print from an application, if you only see a limited view, then maybe you need to press the Show Details button, as shown below.

  • Can find photo tray option when printing

    I bought a HP Photosmart 6521 today, part of the 652x family.  I set it up via USB cable to my old Mac which is running 10.7 Leopard.  The printer software automatically downloaded and the printer set up like a dream.  Set-up wifi link to my Wifi network.  Could print from my new toptop running OSX10.9 no problem.  Problem is I can find a print option on the laptop computer that alows me to select the phototray.  I looked at both Mac and HP support forums, I downloaded and installed the software for the HP Photosmart 6520 ,no problems with installation.  Still can't see an option on my computer for printing from the phototray.  Any ideas is this likely to be an HP issue or a Mac issue.
    This question was solved.
    View Solution.

    kiwig,
    Excellent -- I thought answer was in the Print Options, although I would not have been able to "get there from here" not having access to Mac software.  Smiling.
    I am pleased to hear you figured out the answer -- and that you Posted the solution! 
    Thanks!
    Kiwig's How-to:  Select photo tray on HP Photosmart 6520 from iPhoto OSX10.9.5
    Click the Kudos Thumbs-Up to show you appreciate the help.
    Click Accept as Solution when the Answer provides a Fix or Workaround!
    Kind Regards,
    Dragon-Fur

  • Automatic tray selection for printing

    When the print out is issued from the SMARTFORM, it should automatically determine the tray for the paper (based on a pre-defined logic):
    The trays can be:
    Tray 1
    Tray 2
    Manual Feed
    Is this possible in SAP? (version 4.6c)
    Is there a dependency on the printer/model
    Thanks,
    Lakshmi.

    Hi,
    Do you want to define the tray statically?.
    Then you can mention the tray at the page level.
    Select the page and select 'output options' tab.
    There you can mention the tray name with the resource field.
    if you want to select the tray dynamically then ,refer the OSS note <b>367128</b> and apply the OSS note which is applicable for release 4.6 C.
    <b>Implement the program correction. Afterwards, you can also enter a field (for example, ) in field 'Resource'. This field must be defined in a global manner (the type must be RSPORESNAM). You must set the value of this field before you call up the page. That is, you must either supply the value on the first page via the interface or you must set it during the initialization. If you call a page via an explicit page break, you must have set the value before the page break.</b>
    <b></b>
    I hope this should resolve your issue.
    Thank you.
    Regards,
    Karuna.M

  • No 'Disk Tray' option when printing from Photoshop -Pixma MG6220

    I am trying to print to the Disk Tray.   I put the tray in but the printer does not recognize it.  I try to select the tray as an option in my print settings but there is no tray option there to select (Photoshop, MS Word, PDF, etc).   When I look to the manual for how to print to the tray, it only gives instructions on how to print using Canon's consumer-grade printing app. Please help. 
    I am on a Mac Pro running Yosemite.  The printer is plugged in via USB.

    kiwig,
    Excellent -- I thought answer was in the Print Options, although I would not have been able to "get there from here" not having access to Mac software.  Smiling.
    I am pleased to hear you figured out the answer -- and that you Posted the solution! 
    Thanks!
    Kiwig's How-to:  Select photo tray on HP Photosmart 6520 from iPhoto OSX10.9.5
    Click the Kudos Thumbs-Up to show you appreciate the help.
    Click Accept as Solution when the Answer provides a Fix or Workaround!
    Kind Regards,
    Dragon-Fur

  • Acrobat Distiller.app can't be selected when printing to Adobe PDF 9.0

    When trying to print a word 2004 doc to Adobe PDF 9.0 ( using the Adobe PDF 9.0 option from the Printer drop-down list within the print dialog box - I have CS4 Design Premium installed including Acrobat Pro 9) I'm asked to locate my copy of Acrobat Distiller in a dialog box. I point it to the correct location. However Acrobat Distiller.app within folder Applications>Acrobat Pro 9 is greyed out and can't be selected. How do I get round this?

    Hello lisagig and welcome to Apple Discussions.
    I would be inclined to run a repair disk permissions first and if that doesn't help then I would reset your printing system. Note that this will remove all of your current printer queues so if you have a number of network printers in the list it would be handy to make a note of their network queue, which you will see via the Print & Fax > Options & Supplies > General pane shown as URL.
    To add the PDF printer queue back, you will need to make the Advanced icon appear in the Add Printer pane. To do this, open Print & Fax and click to Add a printer. Control Click on the current toolbar (next to More Printers will be fine) and select Customize Toolbar. Drag the Advanced icon to the toolbar. Now click the Advanced icon. After a few seconds this pane will become active so you can select the Adobe PDF 8.0 (pdf) in the Type column. Every other column will autofill so leave them as they are except for the Print Using menu, where you will have to open, click 'Select a driver to use' and then type Adobe in the search window. This should show the 'Adobe PDF 3016.102'. Select this and click Add to complete. Now try printing with this new Adobe printer to see if the error has stopped.
    Pahu

  • IPhoto with Leopard - Portrait or Landscape Selection when Printing?

    How do you choose to print Landscape or Portrait using iPhoto with Leopard?

    You don't have to. When you select the paper size and printer the orientation should be set automatically as displayed in the preview window.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Printer Tray Selection in xml-Source

    I want to print my AdobeForm only at the Tray1. When there is another Paper in the primary Tray the printer have to print the AdobeForm in Tray1 not in the primary Tray.
    Who can tell me whats the source Code. PrinterProtocoll is PCL5e.
    Thx

    Refer these threads,
    Print to different output tray in SAPscript/Print Workbench
    Automatic tray selection for printing
    Regards,
    Joan

  • Printer tray selection VS2010

    We have the following questions regarding windows printer default tray determining tray to print from:
    <br><br>
    1. When we set m_reportClass.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.FormSource, it defaults back to Auto (we can see that when we debug, it simply ignores the command) - why is that, and which option should we use to get the printer to use PrinterDefaultTray?
    <br><br>
    2. Default Printer impacts rpt. file even though "No Printer" is checked in the Page Setup dialog - so the default printer set on the developer PC opening the Page Setup of a .rpt file (not making a change, just opening) will change the file. Why is that and what change is made?
    <br><br>
    3. We have made a default 'dummy' printer on the developer pc which is used when opening the .rpt file. If a similar printer with the same name does not exist on the PC printing the report, we cannot control the tray that is prints from.
    <br><br>
    Is there a viewer that can show what has been changed inside an .rpt file to better understand what is happening to the file when it is opened in VS2010?
    <br><br>
    We are experiencing an issue with Crystal Reports VS2010 when trying to print reports to a specific tray. We have recently upgraded from .net 1.1 to .net 4.0 and in relation to this we also upgraded the CR version.
    <br><br>
    In the previous version we were able to setup windows printers with a specific default tray and when printing to this windows printer, the default tray of this windows printer was used. We have a range of printers being used in a client windows forms application, so we need to be able to continue letting the windows printer definition determine which tray to use. Preferable we would like to set PaperSource to UsePrinterDefaultTray, but that option does not seem to exist (or we have not found it yet). We have found another solution, but would like to understand why it works so we know that it is a viable solution.
    <br><br>
    The application is based on creating a report using the CrystalDecisions.CrystalReports.Engine.ReportClass. The example below has been shortened for readability:
    <br><br>
    CrystalDecisions.CrystalReports.Engine.ReportClass m_reportClass = new new EKRB007A();<br>
    // create/get data for report<br>
    // u2026<br>
    m_reportClass.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4;<br>
    m_reportClass.FormatEngine.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4;<br>
    <br><br>
    m_reportClass.SetDataSource(this.dataSet);<br><br>
    <br><br>
    CrystalDecisions.Shared.PageMargins pm = new CrystalDecisions.Shared.PageMargins(<br>
                                    this.getA4InvoicePrinterOriginalHorizontalAlignment(), <br>
                                    this.getA4InvoicePrinterOriginalVerticalAlignment(),   <br>
                                    m_reportClass.PrintOptions.PageMargins.rightMargin,    <br>
                                    this.getA4InvoicePrinterOriginalVerticalAlignment()     );<br>
    <br>
    m_reportClass.PrintOptions.ApplyPageMargins( pm );<br>
    <br>
    // The name of the windows printer to use is read from parameters.<br>
    m_reportClass.PrintOptions.PrinterName = this.getA4InvoicePrinterCopy(); // here it will return 'InvoicePrinter'<br>
    <br>
    m_reportClass.PrintToPrinter(<br>
            1,<br>
            true,<br>
            1,<br>
            m_reportClass.FormatEngine.GetLastPageNumber( new CrystalDecisions.Shared.ReportPageRequestContext()));<br><br>
    The printer has the 'No Printer' set in the Page Setup dialog as we have different printers with different number of trays, so we need to be able to specify the printer at runtime (according to the VS2010 CR documentation, there should be two dialogs - Print Setup and Page Setup, but in VS2010, we can only find the Page Setup, and it includes some of the options from the old Print Setup dialog).
    <br><br>
    Developer A, has two printers: printer 'Generic Text' set to default and printer 'InvoicePrinter' (the one to print from as read from the paramter in the above code). The 'Generic Text' is a generic text printer with no trays and the 'InvoicePrinter' is an OKI printer with two trays.<br><br>
    Developer B, has printer 'InvoicePrinter' set as default.<br><br>
    Developer C, has two printers: printer 'SalesList' set to default and printer 'InvoicePrinter'<br><br>
    Developer A sets up printer 'InvoicePrinter' to print in tray 1 (and 'Generic Text' is default printer). Then opens the .rpt file and compiles. If a print is made on the developer PC, it prints to the correct tray. We can change 'InvoicePrinter' to tray 2 and again it prints correctly. However, if the same .dll is deployed on Developer B's PC, and a print is made, it always uses the same tray even though the windows printer is changed (it actually uses the 'InvoicePrinter', but it ignores the tray it is configured to use). The same is the case for Developer C's PC.
    <br><br>
    We have tried to set m_reportClass.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.FormSource and m_reportClass.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.Auto, but it has no impact.
    <br><br>
    If Developer B adds a printer called 'Generic Text' (even though it is not to be used) AND sets this printer to be the default printer, then it works exactly as on Developer A's PC - meaning that the windows printer tray definition of 'InvoicePrinter' is used correctly.
    <br><br>
    Our solution rigth now is to install a 'dummy' printer on all developer PCs and on all client PCs. This printer must be set as default printer on developer PCs so when the Page Setup of any .rpt file is opened (yes, just opening it changes the file), the new file generated will be based on the 'Generic Text' printer. We will then change the default printer on client PCs just before printing to the 'Generic Text' printer and set it back to their 'normal' default afterwards.
    <br><br>
    In my dev team we all agree that this is not the optimal solutions, so any suggestions will be well received.
    Edited by: Visual Reporting ApS on Oct 17, 2011 12:08 PM

    Use the InProc RAS SDK, not CR SDK. More functional, same licensing.
    See the following forum threads:
    |Re: Using printReportOptions.BinName, Tray Printing
    Re: Printer Tray Selection
    Re: Custom Paper Size & Orientation Problem
    Re: 8.5 x 5.5 paper size in VS2010 with Basic Crystal report
    Re: How to print a report in landscape?
    And don't forget to do more searching. Also, sample InProc RAS apps are [here|https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples].
    An intro to InProc Ras:
    [How to Use The RAS SDK .NET With In-Process RAS Server|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32]
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Printer tray selection in smartforms

    Hi All,
    I have a requirement that for a particluar printer the smartform should be printed using a particular tray (for ex. Tray4). How can this be achieved?
    Regards..

    Refer these threads,
    Print to different output tray in SAPscript/Print Workbench
    Automatic tray selection for printing
    Regards,
    Joan

  • Dynamic Tray Selection in Smartforms

    Hi all,
    I am looking for a solution, to set the tray in a Smartform dynamically.
    It is not sufficient to set the Tray statically on the "Output Options" tab -> Ressource Name.
    Can anybody help me?!?
    Thanks and best regards,
    SteCee

    Normally, tray selection is done using GET_PRINT_PARAMETER FM.
    Refer to these threads, may be helpful -
    Print to different output tray in SAPscript/Print Workbench
    Automatic tray selection for printing
    Regards,
    Amit

  • Problem selecting tray when printing according to PDF format

    When printing a PDF file according to the PDF format the program is not selecting the proper tray for legal size documents.  Everything is printed on letter size paper. 

    You need to tell your printer what tray to use. Reader doesn't tell the printer what tray to use, it is the printer driver. If you are asserting that you have properly set the printer driver to print to a tray while using the Print command in Reader, you will need to tell us what OS? What version of Reader? What printer? What printer driver? How and when you are setting the printer driver info into the Print Dialog box.

  • 7515 keeps trying to print from photo tray when main tray selected (Mac)?

    Just started uing a iMac with the 7515.  It's driving me nuts that it keeps trying to print from the photo tray when I have main tray clearly selected in the print dialog box.
    I'm trying to insert the picture of the print dialog box, but doesn't seem to be working.  In presets (the second selection box from the top) I've got "Print from Main Tray" selected pretty plainly.
    Turning the printer on and off does not help.
    Any help appreciated.

    Hey Chriscic,
    Welcome to the HP Forums!
    Always the best recommend steps to start off with when troubleshooting with a Mac, is to reset the printing system. Then verify, and repair the disk permissions.
    So to start with the reset of the printing system, I have included the document 'Macintosh: Resetting the Printing System in Mac OS X'. Please select your version of Mac, and follow through the steps. If you have Mavericks, you can follow the steps for OS X v10.8. Also, please do not re-add the printer just yet.
    After the reset of the printing system, you will need to complete the verify, and repair of the disk permissions. I have included the document 'Disk Utility 12.x: Repair disk permissions'. For step three when it asks you to select a disk, please select your hard drive. Once the repair has completed, please restart the Mac.
    After the Mac has restarted, you can now add the printer back into the print queue. The try to print. Are you still experiencing the same issue? Or are you able to print from the main tray?
    If you do require further assistance, please let me know the version of Mac OS X you are running. If you need it, I have included the document 'Finding your OS X version and build information'.
    Looking forward to your reply.
    I worked on behalf of HP

Maybe you are looking for