Link to home
Start Free TrialLog in
Avatar of jkteater
jkteaterFlag for United States of America

asked on

A possible way to get the local printers dailog

I have a class that takes in

String filePath
String printerName
String jobName

public void startPDFPrint() throws Exception {
      new AplotPdfPrintLocal().printPDF("c:\\Temp\\test.pdf", "\\\\PrintServer\\MyPrinter",
            "PDF Print Job");
     
   }

Open in new window


Right now it sends to the default printer.  
What would be great is if I could display the local printers in a dialog.
Then when the user selects the printer they want to print to, the value of \\\\PrintServer\\MyPrinter is set to the selected printer.

I know that SWT has a PrintDialog, but I think it actually does the printing.

I am looking for any eaxamples or suggestions on how I can achieve the above issue.

If there is some example code included I would be happy to increase the points.  I really need to get this issue resolved as soon as possible.
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jkteater

ASKER

Thanks for the prompt answer.  You are 100% correct on your answer.  After I implemented the dialog in my code - It did send the printerName as I requested, but did not send any other information like copies needed.  Which I do understand why it don't.

This means my Print class needs to take in more data other than printerName.
I increased the points because you answered my question and use code.  Thanks