dhtmlxscheduler joomla plugin and pdf

hi, i need a help,
how to export to pdf in scheduler joomla plugin?
marking checkbox: General Settings - Print to PDF dosn’t work,
Thanks.

Checkbox in admin settings just enable support of pdf export, you need to

a) grab the scheduler-to-pdf package and put it somewhere online
b) add some kind of link|button to the page, which will call scheduler.toPDF(url)

docs.dhtmlx.com/doku.php?id=dhtmlxscheduler:pdf

i made link to scheduler.toPDF(url)
but it’s error xml


Error appears only after link adding? or scheduler doesn’t work correctly before it as well?
Such error can occurs if DB operation failed, or you are changed domain from which page loaded - it must not be related to any changes in surrounding template.

yes, appers only after link adding, without link it works ok,
i’ve just added:

to codebase/dhtmlxSchedulerconfigurator.php in scheduler joomla component,
as you write in the description:
docs.dhtmlx.com/doku.php?id=dhtmlxscheduler:pdf

If you have added line in question just to end of data - most probably you have break xml processing part of code.

You can locate the next code snippet in the codebase\dhtmlxSchedulerConfigurator.php

<div style='position:absolute; bottom:5px; right:20px; font: Tahoma 8pt; color:black;'> Powered by <a href='http://dhtmlx.com' target='_blank' style='color:#444444;'>dhtmlxScheduler</a> </div> </div>"; return $scheduler;

and change it as

<div style='position:absolute; bottom:5px; right:20px; font: Tahoma 8pt; color:black;'> Powered by <a href='http://dhtmlx.com' target='_blank' style='color:#444444;'>dhtmlxScheduler</a> </div> </div> ... code for button here, with escaped quotes .... "; return $scheduler;

i’ve change it as you write
and now it’s Parse error

where can i locate code:

in dhtmlSchedulerconfigurator.php to get pritnt to pdf working correctly ?
as you write before, i get parse error,
thanks

Check the attached file, line 580
dhtmlxSchedulerConfigurator.zip (7.33 KB)

thanks, now button works, no parse errors,
but i can pritnt to pdf only month,year and agenda view,
no action on week or day view.

No action at all, or empty new window | empty pdf file output ?
In second case, check the folder of scheduler-to-pdf - it may have error-report xml file.

docs.dhtmlx.com/doku.php?id=dhtm … _reporting

i upgraded my /codebase/ext/dhtmlxscheduler_pdf.js to dhtmlxscheduler_pdf.js from v.2.3 Standard Edition package full and i can print to pdf day,week,month,year,agenda view.
one thing what i can’t print is Unit view from Custom fields, i get empty new window.


Problem confirmed, this is not related to the scheduler itself but to the pdf conversion script.
Fixed version of toPDF scripts will be available till the end of September

thanks Stanislav!,
Fixed version of toPDF scripts solved my problem, now i can print to pdf Unit view from Custom field.

how can i change a print orientation of Unit view?, i need a horizontal

you can find the next code in server/pdfGenerator.php:

switch ($this->mode) { case 'month': $this->orientation = 'L'; $this->printMonth(); break; case 'year': $this->orientation = 'L'; $this->printYear(); break; case 'agenda': $this->orientation = 'P'; $this->printAgenda(); break; case 'timeline': $this->orientation = 'L'; $this->printTimeline(); break; case 'day': case 'unit': case 'week': default: $this->orientation = 'P'; $this->printDayWeek(); break; }

It defines an orientation for every view and sets it in property $this->orientation.
Letter P means portrait
Letter L means landscape

i’ve changed $this->orientation = ‘P’; on $this->orientation = ‘L’; and still print portrait

Sorry, there was a problem in code.
You need to do one more change

in pdfGenerator.php

change

$this->wrapper->drawDayWeekHeader($this->columnHeader, $this->rowHeader, $this->dayTopHeight, $this->dayLeftWidth, $this->bgColor, $this->lineColor, $this->scaleColorOne, $this->scaleColorTwo, $this->dayHeaderFontSize, $this->dayScaleFontSize, $this->profile);

as

$this->wrapper->drawDayWeekHeader($this->columnHeader, $this->rowHeader, $this->dayTopHeight, $this->dayLeftWidth, $this->bgColor, $this->lineColor, $this->scaleColorOne, $this->scaleColorTwo, $this->dayHeaderFontSize, $this->dayScaleFontSize, $this->profile, $this->orientation);

prints ok, thanks!

I downloaded dhtmlxScheduler v.2.3 and the problem remains. I made the change you suggested but didn’t work, no matter which orientation type I use (L or P) it prints always portrait. Any help? Thanks.