Export to PDF


#81

Thanks Radyno, that helps me a lot. I should be able to do what I need with your info.

Appreciate your help.


#82

cyrakuse, please, update dhtmlxscheduler_pdf.js from attachment.
dhtmlxscheduler_pdf.zip (2.72 KB)


#83

Thanks for helping but with the file attached, the problem is the same :frowning:


#84

Please, make sure that you’ve updated file correctly. Also, please, clear browser cache.


#85

Sorry, i forgot to clean my browser cache :blush:
It work perfectly now.
Thanks a lot


#86

Oups, a new problem with this updated file :
It generate only 1 page.
If content need more that 1 page, i have only one page generated.
You can see the problem at the demo i’ve posted to you in privete message.


#87

Hi cyrakuse,
please, open file pdfWrapper.php, replace in method drawTimelineHeader the follow line:

$this->colHeight = ($this->cb->getPageHeight() + $this->headerImgHeight + $this->footerImgHeight - $this->offsetTop - $this->offsetBottom - $sizes->dayTopHeight)/count($rowHeader);

with the follow:

$this->colHeight = ($this->cb->getPageHeight() - $this->offsetTop - $this->offsetBottom - $sizes->dayTopHeight)/count($rowHeader);

#88

That’s not exactly the good solution.
It never generate multiple pages.
It only reduce line height to fit the page but if i have 200 lines, i think it won’t be readable.


#89

Unfortunately we don’t support multipage printing for matrix view for now.
Maybe it will be improved in future.


#90

Hello all,
i am exporting grid to pdf using toPDF function in .net but i aloso want to set orientation of the generated pdf how it can be done please help
i


#91

Is it possible to show the details event on exported PDF? Or only shows that the window show?


#92

Hi,
there is no way to show event details.


#93

I found a solution (a little slut solution) to solve my problem.

Using Javascript we can do anything like this:

//global variable var change=false;

//this function change the change variable to show my details, refresh scheduler function, call pdf method and change again the global variable to restore our configuration. function createPDF(){ change=true; scheluder(); scheduler.toPDF('generate.php','color'); change=false; scheluder(); }

Then, only need to construct an if in our scheduler function.

if(recarregar==true){ scheduler.templates.event_text = function(start,end,ev){ return 'Reserva: ' + ev.text + '\nUsuaris: '+ev.res_detalls; } }else{ scheduler.templates.event_text = function(start,end,ev){ return ev.text; } }

Thanks anyway to try to help me! ;D


#94

Hello,

exporting it toPDF is really easy to implement. And the result ist nice,
at least of you only a view of resources.

In one timeline view i have daydepent betwee 20 and 30 resources.
The standard-PDF-export shows all PDF at one page. Not really useful.

How could i configurate the export to get a PDF-document with more than one page?
(lets say 6-10 Resources per day)

I am using the Scheduler-Export Library in JAVA.
I already know howto edit the sourcecode for selecting Portrait or Landscape-Mode…

thanks,
Mathias


#95

Hello once more,

i got another problem in Scheduler with the day view.

There are lots of parallel events.
So i would like to split the day view - distributing the events on more pages.
Would that also possible?


#96

Hello,
unfortunately there is no way to do it.


#97

Hi,

I am using the timeline view with a second scale (month). If I try to print toPDF, the first columns contain the second scale label and the bars in the following cells are shifted a little to the right (see image).

Is there a way to avoid during export? Will second scale x-labels be supported in an upcoming release?

Thank you and keep up the good work!



#98

Hi,
please, update dhtmlxscheduler_pdf.js and scheduler-pdf-php script from attachment.
It will provide required functionality.
dhtmlxscheduler_pdf.zip (3.37 KB)
scheduler-pdf-php.zip (628 KB)


#99

Hi radyno,

thank you! The new files work well!

Now I have a problem with the date range running into the timeline header but this may be connected to a newer tcpdf version I had to use (because of IIS support). I will investigate.

Regards,

nihon


#100

Hi,

another minor request: the month break in the second scale is off by one day (it should be between last day of previous month and the first day of the next month). Can this be fixed in pdfWrapper.php? What are the possible values for $border?

function drawTimelineHeader(...)
...
for ($i = 0; $i < count($secondScale); $i++) {
				$this->columnHeader[$i] = $secondScale[$i]["text"];
				$Ln = ($i == count($secondScale) - 1) ? 1 : 0;
				$border = 'T'.($i > 0 ? 'L' : '');
				$this->cb->Cell($this->colWidth, $sizes->dayTopHeight, $secondScale[$i]["text"], $border, $Ln, 'C', 1);
}
...

Thank you again for your support!

Regards

nihon