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.
Unfortunately, activation email could not send to your email. Please try again.

Advanced printing and PDF

Thread ID:

Created:

Updated:

Platform:

Replies:

91703 Nov 28,2009 09:18 PM Dec 2,2009 06:02 AM Windows Forms 3
loading
Tags: GridControl
Peter Trevor
Asked On November 28, 2009 09:18 PM

I have a GridControl on my form that implements a virtual grid. I have added printing capabilities to it (print, print preview, page header, and page footer) and everything works great, except ...

I need to have a header section: one or more special pages that appear before the grid but as part of the same document. How do I do this?

Bonus question: How do I 'print' all this to a PDF document? (I have the full Enterprise Edition of ESS which includes Essential PDF.)

Jisha Joy [Syncfusion]
Replied On December 1, 2009 01:27 AM

Hi,

Thank you for posting query to us.

You need use the derived class GridPrintDocumentAdv for this purpose. Headers and footers can be added with the events called DrawGridPrintHeader and DrawGridPrintFooter. See the following browser sample for more details:

C:\Documents and Settings\[Username]\My Documents\syncfusion\essentialstudio\7.4.0.20\Windows\Grid.Windows\Samples\2.0\Print\Print Grid Demo\cs

Regarding PDF export issue, please refer the following sample that implements the same.

C:\Documents and Settings\[Username]\My Documents\syncfusion\essentialstudio\7.4.0.20\Windows\Grid.Windows\Samples\2.0\Export\PDF Export Demo\cs

Please let me know if you have any queries.

Regards,
Jisha

Peter Trevor
Replied On December 1, 2009 01:53 PM

Hi Jisha

Thanks for the PDF part, that looks easy enough.

But for the main question ...

I already am using the GridPrintDocumentAdv with headers and footers as that example showed. I can print the grid with page headers and page footers okay. My problem is how do I add extra pages to the output, extra pages that are nothing to do with the grid but I'd like to be sent to the printer (or print preview) as part of the same print job. In other words I want to embed the grid print as part of a larger document.


Jisha Joy [Syncfusion]
Replied On December 2, 2009 06:02 AM

Hi,

I think you can do what you want by deriving GridPrintDocument and overriding OnPrintPage and print the the larger document at the begining. Please try this suggestion and let me know if this helps.

Regards,
Jisha




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;