troubleshooting Question

Add Printing Settings in Java Code

Avatar of Sarki Amada
Sarki AmadaFlag for United States of America asked on
Java* jtextPrinters and Scanners
2 Comments1 Solution191 ViewsLast Modified:
Hello!

I'm new to java, I have a jTextArea that I want to send it's content to print.
I was able to achieve that using
Boolean complete=jValueText.print();
            if (complete){
                JOptionPane.showMessageDialog(null, "Done Printing...");
            }
            else{
                JOptionPane.showMessageDialog(null, "Printing...");
                
            }

This approach will show a printer dialog and the user can set the settings, like paper orientation etc. But I'll like to just set the settings in the java code, so when the user clicks the print button, it will just print the text using the settings I configured in the java code.
The settings I want to configure are;
Page size
Orientation
Printer to use
Scale size of the page
I'm using Netbeans 8.2, MacBook Pro Sierra
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros