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

Reg : PDF format

Hi, I am using export to pdf function. I have taken example from syncfusion northwind pdf sample. 1)Increse number of columns in the datable. 2)Do export To pdf . while i am getting in the pdf format my columns width are getting reduced. Note: If number of columns less then 10, pdf format is more readable otherwise not. Help me..!

2 Replies

AD Administrator Syncfusion Team July 12, 2005 06:16 AM

Hi Anna, I am afraid this is a limitation of the PDF format. There seems to be no way to increase the width of the PDF document so the alternative approach would be to limit the number of columns in each page, we would have to make the remaining columns continue on the next page. [This would be the same behavior as printing a grid that is 100+ coumns wide on a A4 Paper.]. We will have a Grid to PDF exporter component soon, that would automatically do that. Thanks, Stephen. >Hi, > I am using export to pdf function. >I have taken example from syncfusion northwind pdf sample. > >1)Increse number of columns in the datable. >2)Do export To pdf . >while i am getting in the pdf format my columns width are getting reduced. > >Note: If number of columns less then 10, pdf format is more readable otherwise not. > >Help me..!


AS Anna Srinivasan July 21, 2005 03:35 AM

Hi, Atleast for few columns(<5) i want to set the column witdth what is there in gridgroupingcontrol. How do i do that...? Source for PDF -- DataTable. Following code i am using to get pdf file DataTable dt = new DataTable(); int numCols = grid.TableDescriptor.VisibleColumns.Count; foreach(GridVisibleColumnDescriptor cd in grid.TableDescriptor.VisibleColumns) { string s = grid.TableDescriptor.Columns[cd.Name].HeaderText; dt.Columns.Add(new DataColumn(s, grid.TableDescriptor.Columns[cd.Name].FieldDescriptor.GetPropertyType())); } foreach(Record r in grid.Table.FilteredRecords) { DataRow dr = dt.NewRow(); foreach(GridVisibleColumnDescriptor cd in grid.TableDescriptor.VisibleColumns) { string s = grid.TableDescriptor.Columns[cd.Name].HeaderText; dr[s] = r.GetValue(cd.Name); } dt.Rows.Add(dr); } dt.AcceptChanges(); table.DataMember = dt.TableName; table.DataSource = dt; table.ConfigureTable(dt); thanks, Anna

Loader.
Live Chat Icon For mobile
Up arrow icon