c# 4.0 - Populate iTextSharp pdf with database values -
i have code below , trying populate pdf values database.
pdfpcell points = new pdfpcell(new phrase("and therefore entitled ", arialcertify)); points.colspan = 2; points.border = 0; points.paddingtop = 40f; points.horizontalalignment = 1;//0=left, 1=centre, 2=right // code below needs attention var cid = "alfki"; var xw = customers.first(p => p.customerid ==cid); table.addcell(xw.companyname.tostring());
i can not figure out going wrong. when remove code under 'code below needs attention' works need database values.
i using webmatrix itextsharp. if answer need further code please let me know.
pdfpcell cell=new pdfpcell(new phrase(xw.companyname.tostring())); cell.setcolspan(numcolumns); table.addcell(cell); document.add(table);
Comments
Post a Comment