Printing Capabilities. Part 2 – dhtmlxScheduler.

| Comments (5)

About three months ago, we introduced a solution for converting dhtmlxGrid to PDF to provide the ability to print grid content. Now it’s time to do the same for dhtmlxScheduler, just as we promised. The Scheduler-to-PDF solution is in many ways similar to Grid-to-PDF. This is a stand-alone service that can work independently of the component itself. As with dhtmlxGrid, it requires a server with PHP support.

To try the printing functionality for dhtmlxScheduler right now, download this package. It contains two folders:

  • server – the script of the printing service; should be placed on the PHP server.
  • client – client-side script; should be added to the page together with other dhtmlxScheduler .js files.

 
After placing the scripts in the correct locations, you can print the current state of the calendar by calling:

scheduler.toPDF(“http://some.com/server/generate.php”);

Here the parameter is an http path to the script of the printing service.

The view of the calendar in PDF will depend on the calendar mode. For instance, for the Month View mode it will look like this:

dhtmlxScheduler in PDF. Month View.

dhtmlxScheduler in PDF. Month View.

…and for the Week View it will have a different look:

dhtmlxScheduler in PDF. Week View.

dhtmlxScheduler in PDF. Week View.

The current version of dhtmlxScheduler supports printing in Month, Week, Day, Year, and Agenda modes.

The printing service operates with data in Unicode, so the printing should work for any language. (We’ve tested this functionality with some West European languages and Cyrillic.)

Although a single command is enough to simply print the calendar, this solution provides much more flexibility. You can configure sizes and colors of calendar elements, font sizes, and other parameters. All the technical detail can be found in the documentation.

Comments

  1. jc April 6, 2010 at 4:52 am

    Hello :)

    I’ve made a custom solution for creating pdf based on html2pdf itself based of fpdf. I can use header, footer and printing the following grid :

    Col1a Col1b Col1c
    ===============
    Col2a Col2b Col2c
    ===============
    Col3a Col3b Col3c
    ===============

    like this :

    Col1a Col1b Col1c
    ————————–

    ===============
    Col2a Col2b Col2c
    ————————–

    ===============
    Col3a Col3b Col3c
    ————————–

    ===============

    Where the blank lines can be used in a meeting for taking annotations.
    Colums’s headers are repeated on the top of each pages.

    It could be cool to have such features in a standard dhtmlx .topdf solution :)

  2. Printing Capabilities. Part 2. dhtmlxSch... April 29, 2010 at 5:39 pm

    […] the rest here: Printing Capabilities. Part 2. dhtmlxScheduler. « DHTMLX Blog If you enjoyed this article please consider sharing […]

  3. Jason May 3, 2011 at 11:25 pm

    Why is it that the text is always cut off on the right side? I fixed this in the css by removing the wrap on the clear class but seriously WTF?

  4. Marc July 16, 2011 at 2:19 am

    Hello, i´m searching for an dhtml devloper.
    I need a crm system build on dhtml.
    frischwerk@gmail.com

Leave a Reply