We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Print issues

Hi Clay, 1) I think you guys have a bug with print button on the preview window. If printgrid''s first row Covers all columns on the page1 but does not in pages other than page1, when I print from the print buttom of the preview window, it prints the non-covered row although the preview window shows covered row. Can I hide the print button in this preview window? 2) In code: GridPrintDocument pdGrid = new GridPrintDocument(this, printPreview); I use pdGrid.DefaultPageSettings.Bounds.Width to resize my print grid''s column widths to... Is this is the right unit to resize my columns to. This is ofcourse in landscape mode. I am finding that to get right column widths, I have to subtract 200 (magical #) from pdGrid.DefaultPageSettings.Bounds.Width. Do you know why? Is this a bug? ( one point of interest is in *portrait* mode the difference in widths of the pagebounds to marginbounds is 200, but as I noted before, I am printing in landscape mode) And somehow the value of: pdGrid.DefaultPageSettings.Margins.Left pdGrid.DefaultPageSettings.Margins.Right does not seem to have any effect on the page/margin bounds...! Appreciate your help.

4 Replies

AD Administrator Syncfusion Team November 9, 2004 07:34 AM UTC

Here is a little sample that shows how you can disable that toolbar print button. The sample also shows margins working for me. It shows 3 different left & right margin settings, 0, 100, 300. It uses the page bounds to set the col width in a grid. In this sample things seem to work as expected. Can you modify it to show the problem you are having? PrintTest_2965.zip


AD Administrator Syncfusion Team November 9, 2004 04:48 PM UTC

Hi Clay, The problem I am talking about in Point 2 above is that when you chnage the margins to 0, 100 or 300 in this sample the pd.DefaultPageSettings.Bounds.Width remains the same. It does not change based on the margins.


AD Administrator Syncfusion Team November 9, 2004 04:56 PM UTC

Hi Clay, The problem I am talking about in Point 2 above is that when you chnage the margins to 0, 100 or 300 in this sample the pd.DefaultPageSettings.Bounds.Width remains the same. It does not change based on the margins. I want to know the "printable" page bounds after the margins etc are taken into account ( like I said for some reason I have to subtract 200 from the pd.DefaultPageSettings.Bounds.Width). Maybe you can look at your print code and figure out what it is doing to figure out the "printable" area in the page. It is definately not using pd.DefaultPageSettings.Bounds.Width.... Thanks.


AD Administrator Syncfusion Team November 9, 2004 06:58 PM UTC

It is using pd.DefaultPageSettings.Bounds.Width minus the margins. The margins are printable areas that you do not want the grid to use. This way, they are free for you to use in some other manner. We do have a source code version of our libraries if you want to study the exact printing code. Rectangle bounds = this.DefaultPageSettings.Bounds; bounds.Width -= this.DefaultPageSettings.Margins.Left + this.DefaultPageSettings.Margins.Right; bounds.Height -= this.DefaultPageSettings.Margins.Top + this.DefaultPageSettings.Margins.Bottom;

Loader.
Live Chat Icon For mobile
Up arrow icon