https://github.com/dhtmlx/scheduler-to-pdf-net
dhtmlxScheduler v4.x to PDF print tool for .NET
https://github.com/dhtmlx/scheduler-to-pdf-net
asp-net dhtmlx dhtmlxscheduler export pdf
Last synced: 21 days ago
JSON representation
dhtmlxScheduler v4.x to PDF print tool for .NET
- Host: GitHub
- URL: https://github.com/dhtmlx/scheduler-to-pdf-net
- Owner: DHTMLX
- Created: 2017-02-16T14:32:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-17T10:45:14.000Z (over 9 years ago)
- Last Synced: 2025-01-13T02:12:40.238Z (over 1 year ago)
- Topics: asp-net, dhtmlx, dhtmlxscheduler, export, pdf
- Language: C#
- Homepage: https://dhtmlx.com
- Size: 25.4 KB
- Stars: 1
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
dhtmlxScheduler v4.x to PDF print tool for .NET
----------------------------------------------------------
This project can be used to print dhtmlxScheduler to PDF using legacy export extension
Docs :
- http://docs.dhtmlx.com/scheduler/pdf_v4.html
Demo:
- http://docs.dhtmlx.com/scheduler/samples/04_export/05_standalone_export.html
### Disclaimer
This version of the export tool won't be actively developed. We encourage you to use the new version of the export tool instead:
- https://dhtmlx.com/docs/products/dhtmlxGantt/export.shtml
- http://docs.dhtmlx.com/scheduler/pdf.html
### Usage
- Add DHTMLX.Export.PDF project to the solution.
- Add reference to it from your web project and create a backend handler.
- Call the handler using client side extension of dhtmlxScheduler http://docs.dhtmlx.com/scheduler/pdf_v4.html#triggeringtheexport
### Sample backend implementation
#### ASP.NET WebForms
~~~cs
//Generate.ashx
using System.Web;
using DHTMLX.Export.PDF;
using System.Web.Configuration;
public class Generate : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
PagesSection pageSection = new PagesSection();
pageSection.ValidateRequest = false;
var generator = new SchedulerPDFWriter();
var xml = context.Server.UrlDecode(context.Request.Form["mycoolxmlbody"]);
generator.Generate(xml, context.Response);
}
public bool IsReusable { get { return false; } }
}
~~~
#### ASP.NET MVC
~~~cs
using System.IO;
using System.Web;
using System.Web.Mvc;
using DHTMLX.Export.PDF;
namespace scheduler2pdf.Controllers
{
[HandleError]
public class GeneratorController : Controller
{
[ValidateInput(false)]
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);
}
}
}
~~~
### License
Distributed under the MIT software license
Copyright (c) 2017 Dinamenta UAB