While generating the Print Preview and Printing, the Go library methods consider the ComputeDocumentBounds() for PrintDocumentSize. So when I have a document whose size is smaller then the View.DisplayRectangle, with GoView.GridStyle set to cross , and try Print Preview or Print, only some part of the page has the view grid lines, and the rest of the page is empty.
I mean I would like the entire page to be filled with Grid lines, however in cases when the document size is smaller then the display rect only some part of the page is printed with grid lines (upto the extents returned by ComputeDocumentBounds())
Can you please guide me as to hwo to overcome this.
I’m confused trying to understand what you want. I can understand wanting to have all printed pages have grid lines, even beyond the PrintDocumentSize. But then you say you only want part of the page in some circumstance(s).
As a general solution I would suggest overriding GoView.PrintDocumentTopLeft and GoView.PrintDocumentSize to return precisely the values you want.
Yes, I want the grid lines to be printed beyond the PrintDocumentSize.
I guess I will have to return the maximum of page’s dimensions and
base.PrintDocumentSize, in the override of PrintDocumentSize.