The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I have a GGC. I am trying print and as well as print preview my data being displayed in grid.
The code I am using for print & print preview are given below.
Print Preview:
==============
//Uses the default printer.
GridPrintDocument pd = new GridPrintDocument(GGC.TableControl, true);
PrintPreviewDialog dlg = new PrintPreviewDialog() ;
dlg.Document = pd;
dlg.ShowDialog();
Print:
=============
GridPrintDocument pd = new GridPrintDocument(GGC.TableControl, true);
PrintDialog dlg = new PrintDialog() ;
dlg.Document = pd;
if( dlg.ShowDialog() == DialogResult.OK)
pd.Print();
Now the problem is:
I clicked on the print button(which calls Print method) and then the properties button in print dialog.
I set up the print as landscape rather than portrait, And Clicked on OK.
Then I clicked on print preview button(which calls PrintPreview method), the print preview was still on
portrait and not on landscape as I had just set up.
When I then clicked on the print button (which calls Print method) and this time printed the document.
The grid was printed on landscape view rather than portrait - so the actual print worked
but the print properties set up were NOT reflected in print preview.
What is the problem? How should I correct my print preview?
Rgds
Rajani Kanth
ADAdministrator Syncfusion Team December 5, 2005 11:47 PM UTC
I am not sure that this is related to Essential Grid. When you launch PrintPreview from the PrintDialog, it is not Essential Grid code setting up the preview. Try this sample. It just draws a rectangle on the page and has no Syncfusion code in it. Do you see the same problem with it?
http://www.syncfusion.com/Support/user/uploads/GenericPrinting_a66a877f.zip