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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Print the contents of the spreadsheet

Thread ID:

Created:

Updated:

Platform:

Replies:

120797 Oct 15,2015 12:32 PM UTC Feb 26,2016 10:33 AM UTC WPF 16
loading
Tags: SfSpreadsheet
Berezkin Gena
Asked On October 15, 2015 12:32 PM UTC

Hello.
I want to use the control "spreadsheet" to display the contents of the XL-document. I tried to use https://www.syncfusion.com/kb/3028/how-to-print-the-worksheets-in-spreadsheet , but failed because "spreadSheetControl" for missing property "GridProperties".
How can I display the icon "Print" on "SfSpreadsheetRibbon" and use it?

Kanimozhi Bharathi [Syncfusion]
Replied On October 16, 2015 11:57 AM UTC

Hi Berezkin Gena,

Thank you for contacting Syncfusion Support.

Please find the details below,


QUERY
RESPONSE
I want to use the control "spreadsheet" to display the contents of the XL-document. I tried to use https://www.syncfusion.com/kb/3028/how-to-print-the-worksheets-in-spreadsheet , but failed because "spreadSheetControl" for missing property "GridProperties".
This KB is related to SpreadsheetControl(Classic) not to SfSpreadsheet.

For Printing in SfSpreadsheet, you can find the samples in the Dashboard in the following link

Link: Syncfusion Dashboard->WPF->Run Local Samples->Grids->Spreadsheet ->Miscellaneous->Printing

How can I display the icon "Print" on "SfSpreadsheetRibbon" and use it?

We have prepared a sample based on your requirement. A Ribbon Tab “Other” has been created and the options “Print and PrintPreview” has been loaded as Ribbon buttons in the tab. Please find the sample from the below link,

Sample:http://www.syncfusion.com/downloads/support/forum/120797/ze/CS-524624951



Please let us know if you have any query.

Regards,

Kanimozhi B


Berezkin Gena
Replied On October 16, 2015 01:29 PM UTC

Hi, Kanimozhi Bharathi.

Thank you.

I have v13.2.0.34 for Syncfusion Dashboard. But my Miscellaneous contain only two item:
-exporting
-localization

What version I need to install to your specified item appearing?

Pannir Selvam S [Syncfusion]
Replied On October 16, 2015 02:10 PM UTC

Hi Berezkin,

The Printing sample for SfSpreadsheet is included from the Essential Studio 2015 Volume 3  v13.3.0.7 and is available for download under the following link.

https://www.syncfusion.com/forums/120659/essential-studio-2015-volume-3-final-release-v13-3-0-7-is-available-for-download

Regards,
Pannir

Berezkin Gena
Replied On October 19, 2015 09:30 AM UTC

Hello.

Thanks for the help.

There are a few questions that came to me when studying your example.
1. I am trying to configure page pdf document (PdfDoc.PageSettings) before it is loaded into PdfViewer. However, the line:
            pdfDoc.PageSettings.Orientation = PdfPageOrientation.Landscape;
            pdfDoc.PageSettings.Size = PdfPageSize.A4;
have no effect. So I do not understand how to set margins for printing.
2. There is no binding between the print dialog and pdfViewer. What I had not set up in the print dialog is not displayed in PrintPreviewWindow. How can I bind these settings in the print dialog to pdfDoc.PageSettings? I tried to use http://help.syncfusion.com/wpf/pdfviewer/printing-pdf-files to access the PrintDialog but I did not. The class is instantiated PrintDialog there are no properties AllowPrintToFile and Document.

Kanimozhi Bharathi [Syncfusion]
Replied On October 21, 2015 01:01 PM UTC

Hi Berezkin,

Please find the details below,


I am trying to configure page pdf document (PdfDoc.PageSettings) before it is loaded into PdfViewer. However, the line:
            pdfDoc.PageSettings.Orientation = PdfPageOrientation.Landscape;
            pdfDoc.PageSettings.Size = PdfPageSize.A4;
have no effect. So I do not understand how to set margins for printing.
We are able to reproduce the issue and this issue will be fixed in the upcoming release 2015 Vol 4
There is no binding between the print dialog and pdfViewer. What I had not set up in the print dialog is not displayed in PrintPreviewWindow. How can I bind these settings in the print dialog to pdfDoc.PageSettings? 
On loading the document with above page settings in PdfViewerControl and printing the same will print the document as expected.
 I tried to use http://help.syncfusion.com/wpf/pdfviewer/printing-pdf-files to access the PrintDialog but I did not. The class is instantiated PrintDialog there are no properties AllowPrintToFile and Document.
The Properties AllowPrintToFile and Document are the properties of 
System.Windows.Forms.PrintDialog. These properties are not available with
System.Windows.Controls.PrintDialog.

To silent print the loaded document in PdfViewerControl WPF, please use the Print() API as in below code snippet.

pdfviewer1.Print();
 
Regards,
Kanimozhi B


Berezkin Gena
Replied On October 21, 2015 02:12 PM UTC

How long do I have to wait for the release?
I draw your attention that when you configure the print is very important to control the margins on the page.

Kanimozhi Bharathi [Syncfusion]
Replied On October 22, 2015 09:56 AM UTC

Hi Berezkin,

Please find the details below,


I am trying to configure page pdf document (PdfDoc.PageSettings) before it is loaded into PdfViewer. I do not understand how to set margins for printing.

The Exception issue we mentioned in the previous update arises only due to the complex formula calculations in the attached excel sheet of Printing Demo. The PageSetup configuration for PDF document will normally work with any other excel files. Hence you can set the orientation, size and margin to the current worksheet of Spreadsheet for printing like the following Code example,

Spreadsheet.ActiveSheet.PageSetup.Orientation = ExcelPageOrientation.Landscape;

Spreadsheet.ActiveSheet.PageSetup.PaperSize = ExcelPaperSize.PaperA4;
Spreadsheet.ActiveSheet.PageSetup.TopMargin = 5;


We have also prepared a sample based on your requirement. Please find the link below,

Link: http://www.syncfusion.com/downloads/support/forum/120797/ze/CS_(2)517018588

Note: 2015 Vol4 release will be in the mid of December,2015.

Please let us know if you have any query.

Thanks
Kanimozhi B


Berezkin Gena
Replied On October 28, 2015 11:53 AM UTC

Hello!
Pdfviewer displays the data is not the same as the data displayed in spreadsheet. I have attached a file that will reproduce the error.
What settings do I need to do to get around this?

Attachment: SpreadsheetBag_74f46de7.zip

Kanimozhi Bharathi [Syncfusion]
Replied On October 29, 2015 12:06 PM UTC

Hi Berezkin,

We have analyzed and tested your reported issue, but we are unable to reproduce the issue with our sample. From the screenshot, we suspect that you must have clicked the “Print Preview” Option in Spreadsheet while the cell is in Edit mode. We suggest you to apply the wrap text for that particular cell to view in Pdf Viewer.

Please find the sample link below for your reference,

Sample: http://www.syncfusion.com/downloads/support/forum/120797/ze/CS_(2)-1443535155

Regards,
Kanimozhi B

Berezkin Gena
Replied On October 29, 2015 01:19 PM UTC

Hi, Kanimozhi Bharathi.

I changed the Excel template file so that you can reproduce the bug.

Attachment: CS_f165c140.zip

Kanimozhi Bharathi [Syncfusion]
Replied On October 30, 2015 12:39 PM UTC

Hi Berezkin,

We are able to reproduce the issue and this issue will be fixed in the upcoming release 2015 Vol 4 which will be in the mid of December, 2015.

Regards,
Kanimozhi B

Berezkin Gena
Replied On February 16, 2016 12:29 PM UTC

I have uploaded a new version of the ES (13.4.0.53). I can see a marked improvement in the PDF converter. But I can not remove the right and left indentation in the resulting PDF file. Excel document that is printed without problems in Excel is absolutely not suitable for print PDF converter. I tried to use an object of class PdfDocument, but PageSettings.Margins property does not respond to the value.

Thirumurugan Loganathan [Syncfusion]
Replied On February 18, 2016 06:09 PM UTC

Hi Berezkin,

 

 We have checked your query from our side and you can remove right and left indentation in the Pdf document by set the margin to the current worksheet of Spreadsheet. Please refer the following Code example,

 

Spreadsheet.ActiveSheet.PageSetup.LeftMargin = 0;
            
Spreadsheet.ActiveSheet.PageSetup.RightMargin = 0; 


We have also prepared a sample based on your requirement. Please find the below sample link.



Sample :http://www.syncfusion.com/downloads/support/directtrac/general/ze/Margin_setting-287548568  

 

Regards,

Thirumurugan


Berezkin Gena
Replied On February 24, 2016 02:19 PM UTC

Hello, Syncfusion Support!

"PageSetup" can not be changed. All settings of this property are made in MS Excel. I'm trying to get the same results when printing in "Excel" and "Spreadsheet". Your test file "Testing Purpose.xlsx"(Margin_setting-287548568) is very well suited to be convinced in the existence of a problem.

P.S. This is not a problem for me personally, but a text editor on your forum defines the word "Syncfusion" as it is written with an error.

Kanimozhi Bharathi [Syncfusion]
Replied On February 26, 2016 03:59 AM UTC

Hi Berezkin,
We have forwarded your query internally to our development team. We will update you the details at the earliest.
Regards
Kanimozhi B

Kanimozhi Bharathi [Syncfusion]
Replied On February 26, 2016 10:33 AM UTC

Hi Berezkin,

Please find the details below,


QUERY
RESPONSE
PageSetup" cannot be changed. All settings of this property are made in MS Excel. I'm trying to get the same results when printing in "Excel" and "Spreadsheet". Your test file "Testing Purpose.xlsx"(Margin_setting-287548568) is very well suited to be convinced in the existence of a problem.
We are able to reproduce the printing issue and this issue will be fixed in the upcoming release 2016 Vol which will be rolled out at the end of March.
 
This is not a problem for me personally, but a text editor on your forum defines the word "Syncfusion" as it is written with an error.
Thank you for bringing this information to our attention.

We will look for ways to resolve this problem, so that this will not happen in the future
 
Regards,
Kanimozhi B


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.

Warning Icon 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.Close Icon

;