• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

PageFormat and PrintRequestAttributeSet

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

What I want to achieve is the following:

Three buttons : Print Setup, Print Preview and Print.

When clicking on Print Set Up, it opens the dialog which that has all the printing settings.

Once i am done with the setup, i can opt for print OR print preview or both one after another.

Currently it is not possible to create a PrintRequestAttributeSet using a PageFormat instance. Which means that if i am going to preview an image I have to define the page layout in two different locations. One for previwing and one for printing. Or am I wrong?
 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please explore it more.
 
marwen Bakkar
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use pageFormat = printJob.pageDialog(pageFormat) to display the page layout dialog and let the user choose his setts. The PageFormat returned is later used to display a print preview dialog. My problem is how to construct a PrintRequestAttributeSet based on this PageFormat instance so if a print operation is requested it is performed with those setts. Does that make sense?
 
marwen Bakkar
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any suggestions?
 
reply
    Bookmark Topic Watch Topic
  • New Topic