This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing problem  RSS feed

 
satya sahu
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i calculate the no of pages to be printed, so that i can give the condition
if(pageIndex > x)
return NO_SUCH_PAGE;
where x is the no of pages to be printed.
Thanx in advance.
 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to know no of pages to finish the printing. Just return NO_SUCH_PAGE when you render the last thing.
 
Raja Kannappan
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to print the contents of JHelpContentViewer. It can be 1 page long or even 100 pages long. So, I don't know how much information is there. In this case how can I determine the number of pages to be printed?
Thanks in advance,
- Raja.
 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, but nothing bright comes to my mind.
Here are two sollutions:
1) You can enumerate whole content and then render and count it yourself.
2) You can try to somehow copy all of the content of your help file to the default web-browser of the target machine and live it on his own to count and render all of the content.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!