Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing problem  RSS feed

 
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.
 
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.
 
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.
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!