How can use Print and Page Setup Dialogs with multiple monitors?

It seems the designers of the printing API forgot to include multiple monitor support.
According to the API, a way to popup a print dialog is done via this manner;
1) PrinterJob.getPrinterJob().printDialog()
or
2)PrinterJob.getPrinterJob().printDialog(PrintRequestAttributeSet atts)
Option (1) brings up the native print dialog and hangs the event thread (another problem, for later i guess) and (2) brings up the Swing dialog which at least doesn't hang the event thread. And while somewhat limited is not a bad print dialog.
The problem is that there is no way to pass a GraphicsConfiguration object, so that the print dialog can know where to popup (what monitor).
So looking around, we have this newer 1.4 method
http://java.sun.com/j2se/1.4/docs/api/javax/print/ServiceUI.html
public static PrintService printDialog(GraphicsConfiguration gc,
int x,
int y,
PrintService[] services,
PrintService defaultService,
DocFlavor flavor,
PrintRequestAttributeSet attributes) throws HeadlessException
So now this method has a way to pass a graphicsconfiguration, so it should know what monitor to create the dialog in.
But this method is such a mess to setup. When I use it, it lists the printers but doesn't select the user's default printer.
But more problematecally is that there is no PAGE SETUP dialog equivalent to this method! So I would have a print dialog that pops up in the right place, but page setup on default monitor! ARGH!!!
The code for ServiceUI has a pageDialog() method but it's commented out for "future release". What a mess.
Is there any way to solve this? To have pageDialog and printDialog on a given monitor?

It seems the designers of the printing API forgot to include multiple monitor support.
According to the API, a way to popup a print dialog is done via this manner;
1) PrinterJob.getPrinterJob().printDialog()
or
2)PrinterJob.getPrinterJob().printDialog(PrintRequestAttributeSet atts)
Option (1) brings up the native print dialog and hangs the event thread (another problem, for later i guess) and (2) brings up the Swing dialog which at least doesn't hang the event thread. And while somewhat limited is not a bad print dialog.
The problem is that there is no way to pass a GraphicsConfiguration object, so that the print dialog can know where to popup (what monitor).
So looking around, we have this newer 1.4 method
http://java.sun.com/j2se/1.4/docs/api/javax/print/ServiceUI.html
public static PrintService printDialog(GraphicsConfiguration gc,
int x,
int y,
PrintService[] services,
PrintService defaultService,
DocFlavor flavor,
PrintRequestAttributeSet attributes) throws HeadlessException
So now this method has a way to pass a graphicsconfiguration, so it should know what monitor to create the dialog in.
But this method is such a mess to setup. When I use it, it lists the printers but doesn't select the user's default printer.
But more problematecally is that there is no PAGE SETUP dialog equivalent to this method! So I would have a print dialog that pops up in the right place, but page setup on default monitor! ARGH!!!
The code for ServiceUI has a pageDialog() method but it's commented out for "future release". What a mess.
Is there any way to solve this? To have pageDialog and printDialog on a given monitor?

Similar Messages

  • How can I print and email a report with a logo?

    How can I print and email a report with a logo?
    Is this possible??

    hi ravikant!
    im talking about reports, not forms.
    i bet se78 is for forms and oaer is for report.
    because my logo is displayed on screen, using html-top-of-page.
    but at the time of printing and email, internally, alv grid is converted into alv list, and alv list doesn't support having a logo.
    That's my know-how of the situation.
    Do you have a way with it???
    Please advice.
    Thanks a lot!

  • How Can I Print 2 Pages per Sheet with Bookmarks in Word 2007?

    Is there any workaround to print 2 pages per sheet (in MS Word) with bookmarks?
    I always get the following message:
    Acrobat PDFMaker has detected that 'Multiple Pages option in Page Setup' has been selected. It will not be able to create tags, links, bookmarks with this option selected...
    --Roborabbit

    The Word 2007 pdf export (the one MS has here: http://www.microsoft.com/downloads/details.aspx?FamilyID=f1fc413c-6d89-4f15-991b-63b07ba5f 2e5&displaylang=en) supports bookmarks right?

  • HT4356 How can we print single pages, such as 1,4 and 8 instead of printing all pages?

    On an iPad, how can we print single pages 1, 4 or  8 or 2, 4 and 7 instead of having to print all pages?

    Thanks, Alex!
    ok, I try first approach in print4.vi, but Labview return an error (view jpg); if I cut From, To controls, the VI print all pages. The same things happen also if I trasform I32 in Variant.
    I don't try second approach, because at this time I have only one report
    I try also with VB macro: this is better (print3.vi) but.....if I use:
    Sub Print_Pages_From_To()
    ActiveDocument.ActiveWindow.PrintOut Range:=wdPrintFromTo, From:="2", To:="3"
    End Sub
    is ok; print the pages selected; if I use:
    Sub PrintPages()
    ActiveDocument.ActiveWindow.PrintOut  Pages:="2-3"  
    End Sub
    printer print all pages.
    what do you think?
    regards,
    Italo
    Attachments:
    print Problem.jpg ‏39 KB
    print4.vi ‏19 KB
    print3.vi ‏19 KB

  • How can I print a pages document in book format ..order?

    How can I print a pages document in book format ..order?

    This is usually a function of the driver you're using. Have you looked in the various PDEs for black and white or grayscale? What kind of printer are you using?

  • How can I print half pages to fit in my circa desk calendar

    How can I print half pages from iCal to fit in my Circa desk calendar?

    That depends on the program, but if it's Preview, go to Page Setup... under the File menu. Select the appropriate paper size there. Then go to File > Print... and do a Preview. If the content does not fit on the page, some printer drivers will have a Scale to Fit setting. If there is none, go back to Page Setup... and manually adjust the Scale until it fits nicely when you do a Preview.

  • How can i print specific pages against searched word or name (in one print command) from 1000 pages

    how can i print specific pages against searched word or name (in one print command) from 1000 pages

    Thanks, Alex!
    ok, I try first approach in print4.vi, but Labview return an error (view jpg); if I cut From, To controls, the VI print all pages. The same things happen also if I trasform I32 in Variant.
    I don't try second approach, because at this time I have only one report
    I try also with VB macro: this is better (print3.vi) but.....if I use:
    Sub Print_Pages_From_To()
    ActiveDocument.ActiveWindow.PrintOut Range:=wdPrintFromTo, From:="2", To:="3"
    End Sub
    is ok; print the pages selected; if I use:
    Sub PrintPages()
    ActiveDocument.ActiveWindow.PrintOut  Pages:="2-3"  
    End Sub
    printer print all pages.
    what do you think?
    regards,
    Italo
    Attachments:
    print Problem.jpg ‏39 KB
    print4.vi ‏19 KB
    print3.vi ‏19 KB

  • How can i print only pages which have been highlighted, from a multi page file?

    How can i print only pages which have been highlighted, in a multi page file.

    Ah, I see want you mean. This might not be practical for you, but if you select one instance of the highlighted text and add a [space] to the little sticky note, all of the highlighted text on that page will appear in the summary.

  • How can I print a page?

    Hi
    How can I print a page in Firefox for Android? (Edited)
    ToddeSwe

    Why can't we have menu in Android Firefox to do the printing? like in the pc version.
    ToddeSwe

  • How can use Attrib and Trasitive attrib in Infoset in BI7

    Hi Experts,
    How can use Attrib and Trasitive attrib in Infoset In BI7.
    Detail will be great.
    Thanks

    Hi Saipriya
    the code :
    data : begin of itab occurs 0,
    partner_no like crmd_order_index-partner_no,
    gross_value like crmd_pricing_i-gross_value,
    end of itab .
    data : begin of wa occurs 0,
    partner_no like crmd_order_index-partner_no,
    gross_value like crmd_pricing_i-gross_value,
    end of wa .
    data : begin of itab2 occurs 0,
    partner_no like crmd_order_index-partner_no,
    gross_value like crmd_pricing_i-gross_value,
    end of itab2 .
    data : begin of wa2,
    partner_no like crmd_order_index-partner_no,
    gross_value like crmd_pricing_i-gross_value,
    end of wa2 .
    START-OF-SELECTION.
    select partner_no
           gross_value
    into CORRESPONDING FIELDS OF TABLE itab
    from crmd_order_index join crmd_pricing_i on crmd_order_index~item eq
    crmd_pricing_i~guid
    where crmd_order_index~process_type_ix = 'ZTA'
      and crmd_order_index~pft_1 = 'X'  .
    LOOP AT itab INTO wa .
          MOVE-CORRESPONDING wa TO itab2.
      COLLECT itab2.
    ENDLOOP.
    LOOP AT itab2 INTO wa2 .
    APPEND BP_GROSS.
    actually we don't know how can we benefit from this code in infoset.
    table1 :CRMD_ORDER_INDEX (the table we take customer number (CRMD_ORDER_INDEX-PARTNER_NO))
    table2 : CRMD_PRICING_I (We take gross value form this table)
    We added BP_GROSS field (adtiona filed to infoset) and would like to append the value we have from the code (Total gross per Customer) but it doesn't work in infoset.
    Thanks in advance.
    M.

  • How can I download and view a pdf with iphone?

    How can I download and view a pdf with iphone?

    If the PDF is an email attachment, you can view it by tapping on the attachment icon while you are viewing the email message. Another option is to set up a dropbox account and then use a computer to drop the PDF into your account. Install the iOS dropbox app and you can view PDFs there that way.

  • How can my wife and I share cloud with 2 different login's

    How can my wife and I share cloud with 2 different login's

    If you each have separate iCloud accounts with different IDs, you can add the other person's account to your device(s) by going to Settings>Mail,Contacts,Calendars>Add Account>iCloud and signing in with their ID.  These "secondary accounts" will sync mail, contacts, calendars, reminders and notes.

  • HT201365 How can the iMessages and FaceTime be activated with this new ISO 7 update? When I enter my Apple ID & password it won't do anything. Says waiting for activation!! Help!

    How can the iMessages and FaceTime be activated with this new ISO 7 update? When I enter my Apple ID & password it won't do anything. Says waiting for activation!! Help!

    Hi there,
    You may find the troubleshooting steps in the article below helpful.
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    -Griff W.

  • Printing only blank pages and Page setup dialog box is black

    When I go to firefox - Print - Print preview - Page setup OR
    Firefox - Print - page setup
    This dialogue box is black. I can't move or adjust it. Nothing is on that screen.
    When I print a webpage (ctrl P, or Firefox, print) nothing is printing.
    I tried a suggestion of resetting by following the instructions here. That did not work.
    http://kb.mozillazine.org/Problems_printing_web_pages#Reset_printer

    I just experienced this problem, and stumbled upon the cause and the fix. When I went to "File" and then "Print Preview" I was getting a "black" screen where the preview should have been. I tried the suggested fixes related to about:config printer settings and add-on's, etc... but it did not help.
    Then, I looked at the "Page Set-up" when I was on the "Print Preview" page. The bottom margin (for whatever strange reason... have no clue) was set at a huge number of inches... like 43801.4 or some such. I changed it back to 0.3 inches... fixed it. Can print just fine now.
    So... if all else fails: check your margin settings on page set-up.

  • How can I print some pages from multipage report

    Hello,
    I have created a multipage report in word. I would like the user to be able to print the pages selected (as in word printing: pages: 1, 2-3); 
    I am using Office 2007 pro, the LabVIEW Report Gen Toolkit, LabVIEW 2009, and Windows XP.
    I used the suggestion in thread:
    http://forums.ni.com/t5/LabVIEW/How-can-you-print-a-single-page-of-a-multipage-report/m-p/155233 , modifying the print VI that comes shipped with LabVIEW: NI_ReportGenerationToolkit.lvlib:Word_Print.VI.
    first of all I put two integer constants on "From" and "To" in the Invoke node (PrintOut), but Labview return an error:
    Error 1015 occurred at NI_ReportGenerationToolkit.lvlib:Word_Print.vi -> NI_Word.lvclassrint Report.vi -> print2.vi
    Then I searched for PrintOut Method in word 2007 Reference guide, and I saw that for using From and To the Range field must have the string  wdPrintFromTo;
    I insert wdPrintFromTo string  in RANGE Field and tryed.... same error......
    After that I change approach; removed all constants and used the field Pages; I put a string "1-2" connected to this field and now the printer respond, but all pages was printed!
    What's wrong?
    many thanks
    Attachments:
    print2.vi ‏18 KB
    parte comune.doc ‏43 KB

    Thanks, Alex!
    ok, I try first approach in print4.vi, but Labview return an error (view jpg); if I cut From, To controls, the VI print all pages. The same things happen also if I trasform I32 in Variant.
    I don't try second approach, because at this time I have only one report
    I try also with VB macro: this is better (print3.vi) but.....if I use:
    Sub Print_Pages_From_To()
    ActiveDocument.ActiveWindow.PrintOut Range:=wdPrintFromTo, From:="2", To:="3"
    End Sub
    is ok; print the pages selected; if I use:
    Sub PrintPages()
    ActiveDocument.ActiveWindow.PrintOut  Pages:="2-3"  
    End Sub
    printer print all pages.
    what do you think?
    regards,
    Italo
    Attachments:
    print Problem.jpg ‏39 KB
    print4.vi ‏19 KB
    print3.vi ‏19 KB

Maybe you are looking for

  • Error Print system failed. HP OJ 6500A

    Hi, The moement I switch the printer on it goes through it motions an end get stuck on the printing system has failed. Error code  0x.....0022. Going through the forum and lot of googling I do not get a definite solution to this problem. I do not wan

  • Swap Image Behavior with Text

    I am trying to figure something out but can't seem to find it. I'm sure it must be pretty simple, but I'm stumped. Basically, I have a main image and a few thumbnail images below it. I've attached the Swap Image behavior to each thumb to change the m

  • File permission issues

    I cannot access any printer plug-ins by going the HD>Library>Printer>Epson>Inkjet route. All the plug-ins are grayed out so I cannot load them. I am attempting to add a printer attached to a windows machine. I followed all the instructions, I can see

  • Impossible to modify clip in imovie

    In imovie 10.0 I can't modify the clips (slow motion, fast frw, instant rep, etc) because the fonction il grey in the menu "Modify". I had no problems with imovie 9.x. Thanks Demostene

  • Is there a version of paint??

    I am new to mac and i have always been with windows and i cant find anything but is there a mac version of paint where u can screw around with pictures and make backgrounds and stuff like that