Olá,
tentando popular uma tabela com o código abaixo, porém no nome deveria retornar em Proprietário "Rogério".
Alguém teria algo para recomendar, alguma referencia em uma aplicação MVC4 C#?
@model B.Models.Anhia
@{
ViewBag.Title = "PDFCadal";
Layout = null;
}
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>my first pdfmake example</title>
<script src="~/Scripts/pdfmake.min.js"></script>
<script src="~/Scripts/vfs_fonts.js"></script>
</head>
<body>
<script>
var docDefinition = {
content: [
{
table: {
// headers are automatically repeated if the table spans over multiple pages
// you can declare how many rows should be treated as headers
headerRows: 1,
widths: ['*', 'auto', 100, '*'],
body: [
['Proprietário', 'Telefone', 'Estado', 'The last one'],
['@Html.DisplayFor(model => model.PF_Proprietario.nome)', '@Html.DisplayFor(model => model.PF_Proprietario.Endereco.Area_Estado.estado)', 'Value 3', 'Value 4'],
[{ text: 'Bold value', bold: true }, 'Val 2', 'Val 3', 'Val 4']
]
}
}
]
};
//var docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
pdfMake.createPdf(docDefinition).open();
</script>
</body>
</html>