Hi,
You can try the way below. it has two sections, the first section use to load the content and render the editor when page load, the second part will fire after you click on the save button or do a page post back, so you can save the pdf file in second part.
- [ValidateInput(false)]
- public ActionResult output_xhtml()
- {
- PrepairEditor(delegate(Editor editor)
- {
- editor.LoadHtml("~/x.html");
- });
- return View();
- }
-
- [HttpPost]
- [ValidateInput(false)]
- public ActionResult output_xhtml(string m = "")
- {
- Editor theeditor=PrepairEditor(delegate(Editor editor)
- {
-
- });
- theeditor.SavePDF("~x.pdf");
- return View();
- }
Regards,
ken