Export to PDF


problem can’t be repeated at local computer. Could you provide complete demo or link to scheduler page?


When I use PHP version, pdf export works fine with standard calendar and recurrent schedule module. When I have a custom lightbox with 2 resource view the pdf generate module produces a blank schedule with the same codebase.


Could you provide link to your page with scheduler or complete demo?


Hi Support,
we use PHP and want to export a whole year in different view states.

As far as I can reproduce the code of the provided according PHP-Files, they are no yet able to handle multipage PDFs (as wished by using ‘toPDFRange’). It even fails at (pdfGenerator.php):

private function renderScales($xml) { $scales = $xml->scale;

where it sould be somthing like:

private function renderScales($xml) { $scales = $xml->page->scale;

The rest of the code doesn’t match with that range stuff, too.
The POST-sent XML-Data seems to be fine, but the server-side libraries can’t handle it obviously.

Is there any different library for the range export I didn’t find yet?

Thanks in advance,


please, update scheduler-pdf-php from attachment. It includes functionality to parse data generated with scheduler.toPDFRange()
scheduler-pdf-php.zip (628 KB)


Thanks radyno! Works perfectly!


will be there a ruby on rails version of the package in near future? :question:


no, we don’t plans to implement scheduler-pdf at Ruby on Rails for now.



I am having the mycoolxmlbody error on the Mac in Chrome. Could you zip and upload the following folder, as this works when posting to this location, but not when I download your DPF zip package.

http:// dhtmlxscheduler.appspot.com/export/pdf

Many thanks.


please, try to use version from attachment.
If it doesn’t work then provide more information about problem please.
scheduler-pdf-php.zip (628 KB)


In month view, when there are too many (more than 5) events in a single day the cell day it reajust which is fine, but when push print button the generated PDF the result is not the same (as snapshot) but it print another page with sticky yellow notes showing the remaining events.

I would like the PDF result be a snapshot, is it possible?


Unfortunately there is no easy way to fix it.
The month view in PDF format will always fit itself to a single page.


Hello, I’m working with the User Control that GeneXus includes in it’s installation folder
wiki.gxtechnical.com/commwiki/se … er+Control,

I’ve already added the timeline view and i’m trying to do the same with the export to pdf functionallity, as GeneXus works with servlets (Tomcat) I implemeted a java-php bridge but i’m getting somo king of error, i give up with this, so now I’m trying to implement the java libary but I don’t relly know how, could someone give me any useful information? I don’t know what file is the one that i need to include to the path

this is my print-button code



buffer is a local variable, the user control works with java script


The java-pdf package must be configured as servlet and mapped to some url, that url will be used in the scheduler.toPDF command

as for servlet configuration, it will look like next

[code]import com.dhtmlx.scheduler.PDFWriter;

public class PDFGenerator extends HttpServlet {

protected Boolean debug = false;

public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
	String xml;
	xml = req.getParameter("mycoolxmlbody");
	xml = URLDecoder.decode(xml, "UTF-8");

	if (this.debug) {
		FileWriter fstream = new FileWriter("error_log.xml");
		BufferedWriter out = new BufferedWriter(fstream);

	PDFWriter pdf = new PDFWriter();
	pdf.generate(xml, resp);



First of all, thanks a lot for your reply, stanislav. I’ve already changed the code and added the path to my button, but when I try to use the print button i get this error, does anyboby knows why can I do???


There is a problem in servlet mapping, as far as I know the above problem is not related to the java code itself but to the mapping in the web.xml


Thank you very much stanislav I’ll check that and as soon as it works I’ll tel you :wink:


Hi huys!
When I try to print the symbol of € another symbol show up (a diamond with a interrogation inside).

I have the following snippet code, any suggestions?

			var fare=event.fare;
                        var texto = scheduler.templates.hour_scale(start)+" - "+scheduler.templates.hour_scale(end);
                        if (fare != ""){
                            //texto = texto + " ("+fare+" €)"
                            texto = texto + " ("+fare+" €)"
                	return texto;


Are you using utf encoding for the above script ?


The links you provided are excellent. I was unable to print with the previous versions of the js and php. It works for my custom work week too. Not seeing anything on the monthly, not sure what’s going on there. But a better start than I was getting before…