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.
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..!
ADAdministrator Syncfusion Team July 12, 2005 11:16 AM UTC
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..!
ASAnna Srinivasan July 21, 2005 08:35 AM UTC
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