Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing a frame Scaling problem  RSS feed

 
Markus Schmider
Ranch Hand
Posts: 148
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have the requirement to print the frame of a java swing application.
I have implemented the following demo

This works. However when I use the PrintableFrame in a larger application, the printout is clipped.
How can I scale the image to the size of the used paper?

When I debug the above demo I notice that x and y are both 12.0.
How is the PageFormat in the above example determined?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!