Get number of copies from print dialog

Hi All,
I am using javax.print API to display the print dialog, I am also able to successfuly print a document.
My questions is how can get number of copies from the print dialog.
I did log of googling, but no sucess...I have been trying from 1 day.
Please help me.
Thanks in advance.

Here is the code:     // TODO Auto-generated constructor stub
          PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
          PrintService defaultPrinter = PrintServiceLookup.lookupDefaultPrintService();
          PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet();          
          selection = ServiceUI.printDialog(
             null, 100, 100, services, defaultPrinter, null, attrs);           
          if(selection!=null){
               selectedPrinter = selection.getName();               
          }Now once the printDialog is displayed i want to get the number of copies selected by the user. I tried all different options from Attribute, but not successful.
Please help...
Thanks.

Similar Messages

  • Hide Number of copies in Print Dialog box

    Hi All,
    I have a requirement in smartform wherein i have to disable the area where we enter number of copies in the Print dialog box, which comes when we execute the program.
    In the print dialog box we usually enter the output device and can choose various options in Spool Control, Number of Copies, etc.
    So here my requirement is that even if user enters more than 1 in Number of copies, in the output it should take only as 1.
    Kindly let me know how to do this..
    Thanks,

    Hi Ashwani,
    You need to do an implicit enhancement for this requirement.
    Program : SAPLSTXBC
    Include : LSTXBCFOP
    Form : PBO_FRONTEND
    Code  :
    LOOP AT SCREEN.
      IF SCREEN-NAME = 'SSFPP-TDCOPIES'.
       SCREEN-INPUT = '0'.
       MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    Regards,
    Lohit

  • System build-in or system variable to get number of records from a query

    Hi,
    Is there a system build-in or system variable to get number of records from a Oracle Forms query?
    Thank you

    Namely, when GO_BLOCK(BLOCK_NAME) EXECUTE QUERY finishes, is there a way directly get the number of the records?
    SYSTEM.COURSOR_RECORD = 1 tells this is the first record
    SYSTEM.LAST_RECORD = 'TRUE' tells this is the last record
    Thanks

  • Problem getting scan of pix from printer/scanner/fax machine

    Long used P E to get pix scanned by printer/scanner/fax.  Then I bought a slide scanner and installed, and PE brought in slides scanned by separate machine.  Disconnected slide scanner.  Now whenI try to get pix scanned by printer/scanner/fax, it says it "Can't find the slide scanner" and SHUTS DOWN.  How can I reset PE to get the scanned pix from the printer/scanner/fax again.  It has no  trouble going to the printer/scanner/fax to print pix.
    Cindi

    Open Organizer and on the top menu click Edit à Preferences à Scanner
    I tried the website and help searching for scan, I have had every PE  since
    2 and have 48,000 pix in my catalogue, so I'm pretty knowledgeable about 
    the program. I also searched under file.  I usually go to Get photos  and
    thought it should give a choice under scanner there.  Never thought to  go to
    Edit and Preferences.
    In a message dated 3/14/2012 7:16:58 P.M. Eastern Daylight Time, 
    [email protected] writes:
    Re:  Problem getting scan of pix from printer/scanner/fax machine
    created by Brett N (http://forums.adobe.com/people/Brett+N)  in 
    Photoshop Elements - View the full  discussion
    (http://forums.adobe.com/message/4267751#4267751)

  • Page number and page range have disappeared from print dialog

    Hello, suddenly in Firefox the print dialog is odd. There are no longer options on the main box for page range and # of pages to print, and many of the other options in the pull down are just blank. This happens with more than one printer, and NOT with those printers in Acrobat, Word etc. so I'm pretty sure it's Firefox. I am in Mac 10.6.8 with the latest Firefox 18.0.1. Thank you.

    Do you mean that that window is cut off like in your screenshot?
    Try to disable hardware acceleration in Firefox.
    *Firefox > Preferences > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/

  • Printed double number of copies (Invoice printing)

    Hi,
    While giving print for invoice from vf03 its printing double number of copies i.e. if i configure 3 copies in
    communication methods then it is printing 6 or 5 or 7 copies.
    Please need information where could be the problem.
    Thanks & Regards,
    Amit

    Hi Amit,
      The extra copies your getting are they blank?
    If you have used page-break option make sure there are no blank lines before it.
    Coz it will result in a blank page.
    Hope it helps!
    Much Regards,
    Amuktha.

  • Set number of copies to print

    Hello,
    We're using Adobe Lifecycle Designer 8.0 and we've the requirement to print copies of our generated pdf delivery form.
    Does anyone know how to set the number of copies dynamically at runtime ? Maybe by using java script  ?
    Thanks in advance !

    Yes, I know OPK8 is used to set number of copies for CO04. We set it to 1 as I mentioned. That is what is needed when the user executes CO04 directly. My question was is there a way to dynamically change the number of copies when running CO04 via creating a BDC (or call transaction) from a custom process, because then we will need more than one copy.
    I am resigned to calling CO04 in a loop for the number of copies I need.

  • Number of Copies to Print Based on Database Field

    Post Author: Ltreat
    CA Forum: Formula
    I am a newbie with Crystal Reports XI.  I am new to this forum. 
    I have a report that I am printing from Crystal Reports XI.  My database has a field called {database.drop-loc}.  If the field has a value of 50, I need to print 50 copies.  How do I perform this task in Crystal? 
    Thanks,
    Lynne

    Hi,
    See if country key can be added to the condition table and insert it in the access sequence.  Define exclusion check box by maintaining this access as the first in your access sequence.  When you maintain condition record for country as one of the parameters, make your number of copied in its communication data as you wish.  It should print based on country key, the number of copies...
    Regards

  • Number of copies to print

    HP Officejet 6500 (Wireless)- but using USB connection-Windows 7 (Home Prem).  If I ask it to print 2 copies from Foxit PDF editor it only prints one copy. If I then go back to the print instruction it still shows "2" against number of copies. I change that to "1" and tell it to print but this time it prints two copies. Can anyone help please?  Thanks.

    Hi,
    This 4 represent - send immidiately. i.e. when you click the message tab, after entering the output type u hav to click further data tab in this there is dispach time option here you have to select send immidiately.
    For taking no. of copies whiling giving the print out system will ask for the option you can enter 4 no. here.
    regards,
    Anisha

  • PS gets wrong paper dimensions from printer driver

    Since yesterday I have trouble with PS CS5 und Mac OS X 10.7.5 as PS does not get correct paper dimensions from standard paper sizes or custom paper sizes from my Epson printer driver. Before yesterday I had no trouble, all went fine. Til Yesterday I printed mostly on roll paper, but yesterday I had to print on a A3+ sheet of paper and PS got in trouble and showed me instead of 32 by 48 cm of paper size than 42 by 59 cm in print dialog with preview. Thil than I have this behavior on all paper sizes but only in Photoshop CS5. All other Apps on my Mac which uses the Mac print dialog show me the correct paper dimenions.
    Any help appreciated.

    I bet that, if you check carefully and with almost pathological tenacity, you will find that the "odd" sizes are creeping into one of the settings in one of the dialog boxes but not in others.
    When something happens to an application "suddenly", that's a clear size to nuke and re-set the preferences, but NOT manually.  Use the key combo at launch.
    To re-create the preferences files for Photoshop, start the application while holding down Ctrl+Alt+Shift (Windows) or Command+Option+Shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop Settings file?"
    Note: If this process doesn't work for you while you're using a wireless (Bluetooth) keyboard, attach a wired keyboard and retry.
    Important: If you re-create the preferences by manually deleting the Adobe Photoshop CS6 Settings file, make sure that you only delete that file. If you delete the entire settings folder, you also delete any unsaved actions or presets.
    Reinstalling Photoshop does not remove the preferences file. Before reinstalling Photoshop, re-create your preferences.
    NEW Video! Julieanne Kost created a video that takes you through two ways of resetting your Photoshop preferences. The manual preference file removal method is between 0:00 - 5:05. The keyboard shortcut method is between 5:05 - 8:18. The video is located here:
    How to Reset Photoshop CS6’s Preferences File | The Complete Picture with Julieanne Kost | Adobe TV
    Mac OS
    Important: Apple made the user library folder hidden by default with the release of Mac OS X 10.7. If  you require access to files in the hidden library folder to perform Adobe-related troubleshooting, see How to access hidden user library files.

  • Save as PDF from printer dialog requires two tries

    When trying to save a file as a PDF from the printer dialog it takes two tries. When the save dialog appears I hit return and it immediately returns with nothing saved. The second time the file is saved normally. According to Adobe this is being caused by Apple PDF Creator; however my selected printer is Adobe PDF 9.0. I have retried resetting the printer using the System Preferences panel with no change. This is really annoying, any suggestions?

    Thank you. I would go back to Adobe and reiterate that this doesn't happen when a non-Adobe printer is active. They are probably not setting something up correctly the first time through. Also, unless AdobePDF offers something crucial when creating PDFs, you could switch the printer as a workaround.

  • Resukt:Get number of rows from 3 different table...?

    Hi All,
    I need to find out number of rows from 3 different table for the same conditions. Instead of writing 3 queries, is it possible to get it thru one query?
    For example, i need to find out number of rows in tables where name = 'Ameet' from 3 different table, i will end writing 3 queries.
    1. select count(1) from table_a where name = 'Ameet';
    1. select count(1) from table_b where name = 'Ameet';
    1. select count(1) from table_c where name = 'Ameet';
    Is it possible to write a single query to get result of all above 3 queries?
    result:
    table_a table_b table_c
    34 44 2

    One way:
    SELECT      (SELECT     COUNT(*) AS CNT FROM TABLE_A WHERE name='Ameet') AS TABLE_A
    ,     (SELECT     COUNT(*) AS CNT FROM TABLE_B WHERE name='Ameet') AS TABLE_B
    ,     (SELECT     COUNT(*) AS CNT FROM TABLE_C WHERE name='Ameet') AS TABLE_C
    FROM DUALIf you want the total:
    SELECT     SUM(CNT)
    FROM
         SELECT     COUNT(*) AS CNT FROM TABLE_A WHERE name='Ameet'
         UNION ALL
         SELECT     COUNT(*) FROM TABLE_B WHERE name='Ameet'
         UNION ALL
         SELECT     COUNT(*) FROM TABLE_C WHERE name='Ameet'
    )

  • Specifying number of copies and printer trays

    Hi,
    can anyone tell me if there is a way, within CR, to specify the number of copies of a report to print and to direct the copies to specific printer trays i.e. copy one prints to printer tray one, copy two prints to printer tray 2.
    Thanks,
    Noel

    You'd have to create an application using .NET or Java to do this.
    Ludek

  • Enter number of copies to print of a form as a variable

    I would like to be able to print a variable number of copies of a form by using a data field to hold the number of copies for each form such as an invoice.  In other words, I'd like to print 3 copies of some invoices, 4 copies of some invoices, 2 copies of others, etc.  For each invoice, the number of copies needed would be part of the invoice data.  Is that possible with Crystal Reports 2011?  Thanks!

    Hi,
    You must a trick to do this, which is described in the following discusson, It is also works for CR 2011, and this is a great idea:
    http://scn.sap.com/thread/1867614
    As a next step, filter your report (in this example the ].[Test_Copy] view) as many copies needed by your variable or database field.
    I hope it helps,
    János

  • Number of copies to print in ME21/22

    Hi all
    I'm searching where is specified the number of copies of purchase order to print in ME21/22 ...
    In my system (4.6C), I can see 4 as this number, but there's nothing in message determination (MN05).
    Where is specified this 4 ?
    Have you any idea ?
    Thanks
    JC

    Hi,
    This 4 represent - send immidiately. i.e. when you click the message tab, after entering the output type u hav to click further data tab in this there is dispach time option here you have to select send immidiately.
    For taking no. of copies whiling giving the print out system will ask for the option you can enter 4 no. here.
    regards,
    Anisha

Maybe you are looking for