Export to PDF

Attached version of export tools is the latest dev version, which fixes few known issue and adds the next new features

a) “fullcolor” mode, in which events are colored the same as in the calendar
b) better support for timeline-rows and timeline-cells views
c) improved look and feel
d) support of week_agenda and map views ( map view prints only event, not map itself )

Version for php
support.dhtmlx.com/x-files/sched … df-php.zip

Version for java
support.dhtmlx.com/x-files/sched … er-pdf.war

Hosted version, at http:// http:// dhtmlxscheduler.appspot.com/export/pdf is updated as well.

To print from map and week_agenda view you will need to use the updated js file
support.dhtmlx.com/x-files/sched … er_pdf.zip

Hello Stanislav,

when I try to send a week view which contains multi-day events to PDF using this version, I get the error message

“max() [function.max]: Array must contain atleast one element”

Is there anything I can do about it?

Also, it looks like the week agenda view is not yet supported, or am I missing something?


You’re right, week agenda isn’t supported yet.
About error message - could you provide debug xml file?
To generate it set variable

$debug = true;

in generate.php file.

PHP package is updated ( can be downloaded by the same link - support.dhtmlx.com/x-files/sched … df-php.zip ). Above mentioned php issue must not occurs anymore.

Hi, first of all i’d like to give thanks to you for sharing this nice scheduler.

i’ve got a scheduler with monday-friday week view, topdf is not working at this view, i wonder if i could change/add some code to make it work, could you help me? thank you very much. :nerd:

with monday-friday week view
Custom views on base of week view works correctly in our samples, if issue still occurs - can you provide some kind of link, where problem can be reconstructed ?

:smiley: nowadays all is perfectly working , i think i had a mistake updating some files.
Thanks a million!

When printing with the asp.net client toPDF, the calendar displays with no data.
Just a blank calendar.

Using Scheduler-to-PDF for ASP.NET, the result is a blank calendar.
Any suggestions?

please give some more details,
does this happening in all views? are you using the latest version of the dhtmlxScheduler?

I have a problem on exporting the scheduler to pdf using java. I already downloaded the new updated js file and had include it inside the scheduler. but the problem now is the view for month does not appear in the pdf, it appear blank. but only for ‘month’, the view for ‘day’ and ‘week’ work just fine.

any idea on how to solve this problem? thank you in advance. :slight_smile:

could you provide link to your scheduler or sample?
Does any error occur on Java server?


I tried the export to pdf function and it worked great on the default scheduler views (month, year etc)

But I had to create a custom view for our purpose, is there something I need to edit in the exporter for it to work with my custom view?

Kind regards.

If view is a variation of one of default ones - it must work without extra modifications.
If yu have created a fully custom view - there is no way to export in to pdf by existing solution.

It is based of the dhtmlx_agenda_view.js

Although I only changed the div class names.

After that it’s mostly styling and adding more html content to the events

In such case it must work, but beware that pdf export will not reflect extra html styling, scheduler exports only text and color values, all other will be ignored.

Strange, I’ll have to debug what is going wrong then.

The console gives me an error for a className
Uncaught TypeError: Cannot read property ‘className’ of null


If problem still occurs - please provide any kind of sample or demo link where it can be checked


I have a timeline setup exactly like the demo and I added the print button, but when I print I lose the time headers.

So I get

March 22 as a header. When actually my header is

            March 22

8am | 9am | 10am | 12am | …

Is there anyway to print the respective times under the header? I tried to look at it, but I couldn’t find any configs or anything.


I solved my last issue, the view is getting generated or atleast the button is doing something.

It gives me an error:

SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Entity 'nbsp' not defined

I notice that there are nbsp tags in the generated xml output.

also on a sidenote.

this is my current calendar:
http:// tinyurl.com/c28myol
(the generation of an pdf through the export buttons has been disabled here for now)

is it possible for the generation to generate it like the grid view (the events) instead of simple black white text beneath eachother? (like when you press print from the browser)

if so where and how can I style/edit the output a bit?