Declined
Last Updated: 26 Jan 2024 12:10 by ADMIN
Angeli
Created on: 25 Jan 2024 07:11
Category: SpreadProcessing
Type: Feature Request
2
Allow custom page size in WorksheetPageSetup instead of just restricting to setting a PaperType

In WorksheetPageSetup, you can only get the PageSize, but not set it. The only way is through setting a PaperType.

 

This is because in Telerik.Windows.Documents.Spreadsheet.Model.Printing.SheetPageSetupBase, the only way to set the pageSize property is by setting a PaperType, then it uses PaperTypeConverter.ToSize(PaperType) to convert it to the pageSize. I cannot see any other way to set this to a custom size set by the user.

 

Please allow custom page sizing by adding a setter for the PageSize if possible. Thank you!

 


WorksheetPageSetup pageSetup = worksheet.WorksheetPageSetup;
Size pageSize = new Size(50, 80)
pageSetup.PageSize = pageSize; // produces cs0200
pageSetup.PageSize.Width = pageSize.Width; // produces cs1612
pageSetup.PageSize.Height = pageSize.Height; // produces cs1612

1 comment
ADMIN
Yoan
Posted on: 26 Jan 2024 12:10

Hello Angeli,

The scenario you are describing is actually expected as we are following the Excel model where the exposed/available functionality allows for the same page setup as SpreadProcessing. That said, the only approach to specifying a page size that remains is through the WorksheetPageSetup's PaperType property.

Thank you for your understanding. I hope this clears things up.

Regards,
Yoan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.