If i have 1000 pages of html can i provide option for page range while printing html? Is it possible in javascript? (Ex: print page 100 to 200)
Umm.. no. you can't.
UPDATE
I didn't go further for the simple reason that trying to control web printing is like grabbing a snake by it's tail and hoping it doesn't bite you. In other words, it's futile and you will get bit. If you want print control then a web app is NOT the way to do things.
If you're users need flexibility with format / layout / or just controlling what page numbers to print then you either have to build a desktop app OR try and control it via delivering regular document like Word or PDF.
Either way it's a lot of work.
Are you sure you can render all that in one pass? It may make more sense to feed out a selected range of files via a server-side language, or ajax in whatever the user selects.
For example, you could provide an input box for the begin and end page, ajax the needed material onto the page, and then printing would be exactly what you want it to be, minus the input fields. At that point, you could either hide the input fields or force that ajax to load into a new window, or something of that nature.
Passing in a page range to the native print dialog... nope.
You could dynamically wrap the portions that you don't want to print with a CSS class that you've defined in a print stylesheet...
<link rel="stylesheet" type="text/css" media="print" href="print.css" />
/* contents of print.css */
.noprint { display: none; }
You'll have to figure out how to get that class onto the appropriate bits of HTML before calling window.print().
You can try using the page-break-before
CSS property to define page breaks in your HTML source.
Then allow your user to print a range of pages as he or she normally would.