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 document question

Hi,
I have a grid which occupies multiple number of pages both in column wise as well as row wise on a print document. Now while printing I want to shrink the grid in such a way that all the columns should occupy a single page but rows can occupy any number of pages. How can i achieve it?

Thanks & Regards
-Kesav

8 Replies

JS Jeba S Syncfusion Team April 12, 2007 10:08 AM UTC

Hi Kesav,

Please refer this browser sample:
C:\Program Files\Syncfusion\Essential Studio\4.4.0.51\windows\Grid.Windows\Samples\Printing\PrintToFit

This sample shows you how to print a grid on a single page. It derives a GridPrintDocument class in order to handle the printing of the entire grid on a single page. It does this by drawing the full size grid to a large bitmap and then drawing this bitmap, scaled to fit the output page.

Kindly let us know if this helps.

Best Regards,
Jeba.


KE kesav April 12, 2007 11:05 AM UTC

Hi Jeba,

Thanks for your quick response. The sample mentioned by you prints all the rows and columns on a single page. But our requirement is to shrink the grid only in column wise, the rows should occupy multiple pages.
Our requirement is with respect to column widths the grid should shrink to fit all the columns on a single page, but there is no restriction on rows. Please comeup with a solution as it is urgent requirement for us.

Thanks
-Kesav.


JS Jeba S Syncfusion Team April 12, 2007 11:40 AM UTC

Hi Kesav,

Please refer this sample which prints all the columns in a single page and the rows in multiple pages. You can increase the number of rows and see the effect.

Here is the sample:
http://websamples.syncfusion.com/samples/Grid.Windows/F59356/main.htm

Best Regards,
Jeba.


AN Andy November 15, 2007 02:05 AM UTC

Hi,

I looked at this sample, and it seems to have significant memory usage and performance issues as the grid gets large (>500 rows).

I need to print very large virtual grids (10,000+ rows) with horizontal scaling. It looks like the issue is with the DrawGrid call in PrepareImage(). Is there any way to modify this code or use an alternative approach to achieve the same effect (fit to a single horizontal page)?

Thanks,
Andy



SS Sri Subhashini M Syncfusion Team December 27, 2007 12:19 PM UTC

Hi Andy,

The issue mentioned here "Perfomance issue with DrawGrid() for huge records in Grid" is suspected to be a defect , so we have created a new incident #40119 regarding this issue. Please refer the incident 40119 for further progress.

Please let us know if you have any further queries, we will be glad to assist you.

Regards,
Suba



S_ Stephane _ December 3, 2008 06:52 PM UTC

Hi,

How can I see incident #40119 ?



IJ Ian Joicey January 1, 2009 07:50 AM UTC

Not sure if this has been resolved or not, I was looking though the threads to find an solution also to scale the printing of my columns to one page.

I didn't see it here and maybe has already been suggested but this is what i ended up doing.

I just simply looped though my columns resizing them so they would fit on a page before creating the GridPrintDocument. Granted, I know how many columns I have and they are the same size, however sizing to a percentage would not be difficult anyway.

I did show the print preview as a dialog, so that I could easily re-size my columns back to the same size once the user clicked print or close.

Again, just used Begin&End Update around the resizing and you never know it happened.

Hope this helps, must be a lot easier than playing with Bitmaps.




>Hi,

How can I see incident #40119 ?





NA Nisha Arockiya A Syncfusion Team January 2, 2009 11:46 AM UTC

Hi Lan,

Thanks for sharing the information with us.

Please let us know if you have any concerns regarding this.

Thanks for choosing and using Syncfusion Products.

Regards,
Nisha.


Loader.
Live Chat Icon For mobile
Up arrow icon