Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
Java Print
Meet Gaurav
Ranch Hand
Posts: 492
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
Currently am printing a document using below code. But this will print in default printer. But I need a printdialog before printing
Someone please assist me.
try { PrintService defaultPrintService = PrintServiceLookup.lookupDefaultPrintService(); DocPrintJob printerJob = defaultPrintService.createPrintJob(); File pdfFile = new File(arg); SimpleDoc simpleDoc = new SimpleDoc(pdfFile.toURL(), DocFlavor.URL.AUTOSENSE, null); printerJob.print(simpleDoc, null); } catch (java.lang.Exception e) { }
I dont want to override print() or to implement printable
Ulf Dittmer
Rancher
Posts: 43081
77
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This may be helpful:
http://www.exampledepot.com/egs/javax.print/DiscoverAll.html
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
java printing - printing a pdf
Java Print Dialog
Java Cyrillic Characters
Printing Report in Struts2
Printing issue in Java 1.4 and Fine in Java 1.5
More...