PDF No Word Wrap


The Export PDF does not word wrap my text – so I’m losing some of my text.

Is there a fix?


unfortunately scheduler PDF-export doesn’t support word-wrap.


Are there any plans to add support for word-wrap?

The words getting cut off are important and need to be displayed on the PDF. Seems like this is an important thing to support.


which view are you talking about?
PDF show so much event text as possible. It cuts text only if event container in less then event text.


When I click the export PDF button, some of the lines are cut off. There’s important information I need to show up. Is there any way to have it wrap or show all of the content somehow?


Could you provide some screenshot of cut text? It may occur in different views and places (header, left scale, events). Fix may depend of this details.


Sure. You’ll see on the attachment that entire words are cut off.

Thanks very much for looking into this for me.


please, download scheduler-pdf-php script and locate it at your server.
After that add into your scheduler_include.html the follow code:

scheduler.config.export_.pdf_url = "http://url to export script/scheduler-pdf-php/generate.php";

Provided export script has increased event height for month-view. If you need to adjust it you may do it in file pdfGenerator.php:

	// height of month line event
	public $monthEventHeaderHeight = 8;
	// height of month line event
	public $monthEventMultidayHeight = 8;

scheduler-pdf-php.zip (628 KB)


Thanks very much for the script. I was actually having a different problem getting the local export script to work. I have everything in place, but the “Export PDF” button still uses http://dhtmlxscheduler.appspot.com/export/pdf and I don’t know how to get it to use this script on my server.

I have the scheduler-pdf-php folder uploaded and the absolute path to it called in scheduler-include.html, but it still isn’t working. Am I missing something?

Thanks for your help.


please check the name of file scheduler_include.html. It should be _ instead of - in name.
It already exists. For joomla it’s location components/com_scheduler/, for wordpress is wp-content/plugins/event-calendar-scheduler/


Yes, the file name for scheduler_include.html is correct. I used the one that already exists in the plugin folder. Still not working.

For the path to “/scheduler-pdf-php/generate.php”, the site is using a sub-domain. Would the file path be “http://subdomain.domain.com/wp-content/scheduler-pdf-php/generate.php” or “http://domain.com/subdomain/wp-content/scheduler-pdf-php/generate.php”? The problem is, I’ve tried both and neither works.


I get this error when I visit the generator.php file in a browser:

[code]Notice: Undefined index: mycoolxmlbody in /home/dawson/public_html/team/wp-content/plugins/scheduler-pdf-php/generate.php on line 9

Fatal error: Uncaught exception ‘Exception’ with message ‘String could not be parsed as XML’ in /home/dawson/public_html/team/wp-content/plugins/scheduler-pdf-php/pdfGenerator.php:26 Stack trace: #0 /home/dawson/public_html/team/wp-content/plugins/scheduler-pdf-php/pdfGenerator.php(26): SimpleXMLElement->__construct(’’, 16384) #1 /home/dawson/public_html/team/wp-content/plugins/scheduler-pdf-php/generate.php(17): schedulerPDF->printPDF(’’) #2 {main} thrown in /home/dawson/public_html/team/wp-content/plugins/scheduler-pdf-php/pdfGenerator.php on line 26[/code]

Is this the problem? Or is it throwing an error because I’m visiting the file alone?


the problem is that your page doesn’t set scheduler.config.export_.pdf_url option to a correct url, it uses default value.
Make sure that provided code was added at page (you may check it in a page source code).

Export script is not designed for direct opening, only for export request from scheduler so exception which you have is ok.


I’m not sure what you mean. Doesn’t the customized scheduler_include.html set it to the correct url?


you file scheduler_include.html must include the follow code:

scheduler.config.export_.pdf_url = "http://url to export script/scheduler-pdf-php/generate.php";

After code is added in file, code will appear in generated html. Please, add code in file, save it, load page with scheduler, open source code (usually Ctrl+U) and make sure that code appears in html.


Yea, I know that’s what I need, and the file is showing up in the source (see attachment), but it’s still using the appspot when I export a pdf. I don’t know what else could be wrong. Any other ideas?


Try to modify your code like here:

scheduler.attachEvent("onXLE", function() {
    scheduler.config.export_.pdf_url = "http://url to export script/scheduler-pdf-php/generate.php";


We’re almost there I think! The calendar loads very slow, but it’s working at least. And the word-wrap is working, but it pushes some of the events onto a new page (see attached). What do you think?

Again, thank you so much for your help!


some events are printe at the second page, because there isn’t enough space to print them at month view. Size of page are limited.


Ok, sure. Thanks again very much for all your help!