Hello Aliaksandr,
thank you.
I moved now to adding afooter image and a header image.
I assumed that these should work by adding the code inot to generator object in the export function in the controller. As such[code]
public ActionResult Export()
{
SchedulerPDFWriter generator = new SchedulerPDFWriter();
var xml = this.Server.UrlDecode(this.Request.Form[“mycoolxmlbody”]);
Hello,
currently like server-side scheduler doesn’t have config options to add header/footer to the rendered pdf, we’ll fix it on one of upcoming updates.
You can use client-side toPDF function, which allows such setting: docs.dhtmlx.com/doku.php?id=dhtm … lient-side
js:
scheduler.toPDF('url', 'gray', true);//gray color scheme, render header
Can you give us code snippet what exactly we need to do to enable client export pdf in MVC.Net? I mean all the content that need to go on MVC razor view. Not for aspx view.
The link you suggested to refer is for php but what if we are using MVC.Net. what we need to write for ‘url’. Because when i download asp.net pdf version it doesnt have generate.php.
using DHTMLX.Export.PDF;
…
//PDF export
scheduler.Extensions.Add(SchedulerExtensions.Extension.PDF);
…
public ActionResult Export()
{
var generator = new SchedulerPDFWriter();
var xml = this.Server.UrlDecode(this.Request.Form["mycoolxmlbody"]);
MemoryStream pdf = generator.Generate(xml);
return File(pdf.ToArray(), generator.ContentType);
}
Hi,
header and footer must be enabled by configs that are currently not present in server side API.
Try specifying export call with a client side code docs.dhtmlx.com/doku.php?id=dhtm … lient-side
also I renamed the header/footer image with name “header.png” and “footer.png” and put inside the “Scripts\dhtmlxScheduler\imgs” folder but its not showing anything.