I'm using MVC3 and iTextSharp.
At First a added a Save and CreatePDF Button. With the PDF Button I call a Method which returns me the actual HTML Code of the shown WebPage.
So far so good, now I started to generate a PDF with iTextSharp. I was wondering, it worked on the first try, but after I added a MVC Grid Table to the with iTextSharp still creats a PDF, but with an Error Message in it.
ERRORURI-Formate are not supported.
Any Suggestions to bring this to work?
The Grid is built like that
@Html.DataGridFor(m => m.ConfigurationArticleList, ItemContainerType.tr,
_S.H<ConfigurationArticle>(
@<text>
<td class="ToDo">
@item.ValidationMessageFor(m => m.ArtNr, "*")
@item.TextBoxFor(m => m.ArtNr)
</td>
<td class="ToDo">
@item.ValidationMessageFor(m => m.Bezeichnung, "*")
@item.TextBoxFor(m => m.Bezeichnung)
</td>
<td class="ToDo">
@item.ValidationMessageFor(m => m.Anzahl, "*")
@item.TextBoxFor(m => m.Anzahl)
</td>
</text>
),
_S.H<ConfigurationArticle>(
@<text>
<td class="ToDo">
@item.ValidationMessageFor(m => m.ArtNr, "*")
@item.DisplayField(m => m.ArtNr)
</td>
<td class="editor-field">
@item.ValidationMessageFor(m => m.Bezeichnung, "*")
@item.DisplayField(m => m.Bezeichnung)
</td>
<td class="ToDo">
@item.ValidationMessageFor(m => m.Anzahl, "*")
@item.DisplayField(m => m.Anzahl)
</td>
</text>
Furthermore the FilePath for the PDF is still hardcoded, any idea to get a SaveFile-Dialog or something else?