Calculating amount of pages with PrintDoc

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thiago777
    New Member
    • May 2007
    • 89

    Calculating amount of pages with PrintDoc

    How to show a progress bar with the status of the printing process, thought pages are processed one by one and I cant estimate how many pages will be used to print the hole document ?

    I am in need of this because I'll have to print huge amount of data, maybe more than 5 thousand pages, and it would be nice to show how much of it had already been processed.

    Any ideas?
  • thiago777
    New Member
    • May 2007
    • 89

    #2
    I am using the PrintPage event handler that is fired everytime a page is build:

    Private Sub PrtDoc_PrintPag e(ByVal sender As Object, _
    ByVal e As System.Drawing. Printing.PrintP ageEventArgs) _
    Handles PrintDoc.PrintP age

    but I cant precisely discover how many pages will be necessary to print my StringBuilder that is used to create the pages because I can have just a few characters in it that represents a whole blank page for example.

    Please any idea would be very helpfull
    tks in advance.

    Comment

    Working...