Export to PDF Problem with multipage

Hi all,

I was asked to create a topic here by Mr. Sergey Melnikov when I asked a question on the documentation for pdf export here: [url]Multi-page export to PDF Scheduler Docs.

I am using the export pdf function in dhtmlx scheduler. I downloaded the java version available on the documentation and used the following code to have a PDF of a certain range of dates i.e. multipage PDF.

$("#export_pdf").click(function() { scheduler.toPDFRange(new Date(2013,0,19), new Date(2013,1,6), 'month', 'http://localhost:8080/scheduler-pdf/generate', 'gray'); });

Although I am specifying a range from 19th January 2013 - 6th February 2013, the PDF is being generated up until 3rd February, i.e. as much as it fits in one page of a month view in the calendar.

Another issue is that I sometimes have a number of events in one day (typically up till 10-12 events) and these are not being displayed well in the PDF. When there are more than 7 events in a day, the PDF displays the first 7 correctly and when the square doesn’t fit anymore, it just creates a reference to that day and continues the next events on the next page.

Is this something which is supposed to happen? Do you maybe have a later version of this function or a possible fix?

I attached screenshots of my calendar and the PDF file generated here:




Thanks in advance for any help :slight_smile:

Hi,
thank you for the problem report.
When you specify the date range including 2/3 months (19 Jan + 6 Feb) you must receive two pages, one for the January and the second for the February. Date From/To only select a period for the events to export. The scales will be as in the usual full month view.
To check it, could you send us an XML that you send to the server? You can get it in the “dhtmlxscheduler_pdf.js” file > method “to_pdf > send_xml(xml, url);”. This first argument can be logged in the console, for example.

As for the second issue, for the moment this is an expected behavior, the cell on the PDF page has a fixed height, and the events out of the cell limits are printed on the second page.

Hi,

Thanks for your prompt reply.
Yes I am aware that the PDF is supposed to have 2 pages with the month view scales as is.
The problem is that the second page where 4th-6th February are included, is not being exported to the file.

This is the XML being generated:

<pages profile='gray'><page><scale mode='month' today='January 2013'><x> <column><![CDATA[Monday]]></column> <column><![CDATA[Tuesday]]></column> <column><![CDATA[Wednesday]]></column> <column><![CDATA[Thursday]]></column> <column><![CDATA[Friday]]></column> <column><![CDATA[Saturday]]></column> <column><![CDATA[Sunday]]></column></x> <row height='118'><![CDATA[31|01|02|03|04|05|06]]></row> <row height='118'><![CDATA[07|08|09|10|11|12|13]]></row> <row height='118'><![CDATA[14|15|16|17|18|19|20]]></row> <row height='190'><![CDATA[21|22|23|24|25|26|27]]></row> <row height='214'><![CDATA[28|29|30|31|01|02|03]]></row></scale> <event week='3' day='5' type='event_clear' x='501.64835164835165' y='236' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE3410]]></body></event> <event week='3' day='5' type='event_clear' x='501.64835164835165' y='260' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE5200]]></body></event> <event week='3' day='5' type='event_clear' x='501.64835164835165' y='284' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CPS1000]]></body></event> <event week='3' day='5' type='event_clear' x='501.64835164835165' y='308' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CSA3212]]></body></event> <event week='4' day='0' type='event_clear' x='0' y='354' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE3013]]></body></event> <event week='4' day='0' type='event_clear' x='0' y='378' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 MNE5201]]></body></event> <event week='4' day='0' type='event_clear' x='0' y='402' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 ICS2206]]></body></event> <event week='4' day='0' type='event_clear' x='0' y='426' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS1102]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='354' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE5301]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='378' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2102]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='402' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 CPS5104]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='426' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 MNE3105]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='450' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS1001]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='474' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS5100]]></body></event> <event week='4' day='2' type='event_clear' x='200' y='354' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2060]]></body></event> <event week='4' day='2' type='event_clear' x='200' y='378' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CSA3220]]></body></event> <event week='4' day='2' type='event_clear' x='200' y='402' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 ICS2230]]></body></event> <event week='4' day='2' type='event_clear' x='200' y='426' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS3086]]></body></event> <event week='4' day='3' type='event_clear' x='300.54945054945057' y='354' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CPS2005]]></body></event> <event week='4' day='3' type='event_clear' x='300.54945054945057' y='378' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE5103]]></body></event> <event week='4' day='3' type='event_clear' x='300.54945054945057' y='402' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS3084]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='354' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE2111]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='378' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS3082]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='402' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 MNE1302]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='426' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE1210]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='450' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE3310]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='474' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS3052]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='498' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS5101]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='354' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS1106]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='378' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2101]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='402' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 ICS2205]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='426' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 MNE3205]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='450' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 MNE3502]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='544' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 CCE2413]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='568' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 MNE3304]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='592' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 MNE5001]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='616' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS2052]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='640' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CSA3220]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='664' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 MNE3302]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='544' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2061]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='568' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2106]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='592' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS5102]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='616' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE2013]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='640' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CSA1017]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='664' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 ICS2211]]></body></event> <event week='5' day='2' type='event_clear' x='200' y='544' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS3081]]></body></event> <event week='5' day='2' type='event_clear' x='200' y='568' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CPS1002]]></body></event> <event week='5' day='2' type='event_clear' x='200' y='592' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS1023]]></body></event> <event week='5' day='2' type='event_clear' x='200' y='616' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CSA3221]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='544' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE3010]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='568' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE5102]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='592' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE1012]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='616' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS1021]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='640' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS5800]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='664' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CPS2001]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='544' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE1011]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='568' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE2015]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='592' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS1024]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='616' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS3087]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='640' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 CIS2103]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='664' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 MNE5102]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='688' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE2310]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='712' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CPS3222]]></body></event></page></pages> dhtmlxscheduler_pdf.js:338 [Sat Jan 19 2013 00:00:00 GMT+0100 (W. Europe Standard Time), Wed Feb 06 2013 00:00:00 GMT+0100 (W. Europe Standard Time), "month", "http://localhost:8080/scheduler-pdf/generate", "gray"] dhtmlxscheduler_pdf.js:350 <pages profile='gray'><page><scale mode='month' today='January 2013'><x> <column><![CDATA[Monday]]></column> <column><![CDATA[Tuesday]]></column> <column><![CDATA[Wednesday]]></column> <column><![CDATA[Thursday]]></column> <column><![CDATA[Friday]]></column> <column><![CDATA[Saturday]]></column> <column><![CDATA[Sunday]]></column></x> <row height='46'><![CDATA[31|01|02|03|04|05|06]]></row> <row height='46'><![CDATA[07|08|09|10|11|12|13]]></row> <row height='118'><![CDATA[14|15|16|17|18|19|20]]></row> <row height='190'><![CDATA[21|22|23|24|25|26|27]]></row> <row height='214'><![CDATA[28|29|30|31|01|02|03]]></row></scale> <event week='3' day='5' type='event_clear' x='501.64835164835165' y='92' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE3410]]></body></event> <event week='3' day='5' type='event_clear' x='501.64835164835165' y='116' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE5200]]></body></event> <event week='3' day='5' type='event_clear' x='501.64835164835165' y='140' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CPS1000]]></body></event> <event week='3' day='5' type='event_clear' x='501.64835164835165' y='164' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CSA3212]]></body></event> <event week='4' day='0' type='event_clear' x='0' y='210' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE3013]]></body></event> <event week='4' day='0' type='event_clear' x='0' y='234' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 MNE5201]]></body></event> <event week='4' day='0' type='event_clear' x='0' y='258' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 ICS2206]]></body></event> <event week='4' day='0' type='event_clear' x='0' y='282' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS1102]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='210' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE5301]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='234' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2102]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='258' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 CPS5104]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='282' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 MNE3105]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='306' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS1001]]></body></event> <event week='4' day='1' type='event_clear' x='100' y='330' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS5100]]></body></event> <event week='4' day='2' type='event_clear' x='200' y='210' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2060]]></body></event> <event week='4' day='2' type='event_clear' x='200' y='234' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CSA3220]]></body></event> <event week='4' day='2' type='event_clear' x='200' y='258' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 ICS2230]]></body></event> <event week='4' day='2' type='event_clear' x='200' y='282' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS3086]]></body></event> <event week='4' day='3' type='event_clear' x='300.54945054945057' y='210' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CPS2005]]></body></event> <event week='4' day='3' type='event_clear' x='300.54945054945057' y='234' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE5103]]></body></event> <event week='4' day='3' type='event_clear' x='300.54945054945057' y='258' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS3084]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='210' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE2111]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='234' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS3082]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='258' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 MNE1302]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='282' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE1210]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='306' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE3310]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='330' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS3052]]></body></event> <event week='4' day='4' type='event_clear' x='401.0989010989011' y='354' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS5101]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='210' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS1106]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='234' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2101]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='258' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 ICS2205]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='282' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 MNE3205]]></body></event> <event week='4' day='5' type='event_clear' x='501.64835164835165' y='306' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 MNE3502]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='400' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 CCE2413]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='424' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 MNE3304]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='448' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 MNE5001]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='472' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS2052]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='496' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CSA3220]]></body></event> <event week='5' day='0' type='event_clear' x='0' y='520' width='90.75824175824175' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 MNE3302]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='400' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2061]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='424' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS2106]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='448' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS5102]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='472' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE2013]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='496' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CSA1017]]></body></event> <event week='5' day='1' type='event_clear' x='100' y='520' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 ICS2211]]></body></event> <event week='5' day='2' type='event_clear' x='200' y='400' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS3081]]></body></event> <event week='5' day='2' type='event_clear' x='200' y='424' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CPS1002]]></body></event> <event week='5' day='2' type='event_clear' x='200' y='448' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS1023]]></body></event> <event week='5' day='2' type='event_clear' x='200' y='472' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CSA3221]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='400' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE3010]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='424' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE5102]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='448' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE1012]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='472' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS1021]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='496' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CIS5800]]></body></event> <event week='5' day='3' type='event_clear' x='300.54945054945057' y='520' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CPS2001]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='400' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE1011]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='424' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CCE2015]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='448' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS1024]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='472' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 09:00 CIS3087]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='496' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 CIS2103]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='520' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 13:00 MNE5102]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='544' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CCE2310]]></body></event> <event week='5' day='4' type='event_clear' x='401.0989010989011' y='568' width='91.3076923076923' height='13' len='1'><body backgroundColor='' color=''><![CDATA[• 17:00 CPS3222]]></body></event></page></pages>

Please note that I didn’t have a send_xml(xml, url) method in the dhtmlxscheduler_pdf.js. This is the to_pdf(…) method available in my version:

[code]function to_pdf(start, end, view, url, mode, header, footer) {
var colors = false;
if (mode == “fullcolor”) {
colors = true;
mode = “color”;
}

	mode = mode || "color";
	html_regexp = new RegExp("<[^>]*>", "g");
	newline_regexp = new RegExp("<br[^>]*>", "g");

	var uid = scheduler.uid();
	var d = document.createElement("div");
	d.style.display = "none";
	document.body.appendChild(d);

	d.innerHTML = '<form id="' + uid + '" method="post" target="_blank" action="' + url + '" accept-charset="utf-8" enctype="application/x-www-form-urlencoded"><input type="hidden" name="mycoolxmlbody"/> </form>';


	var xml = "";
	if (start) {
		var original_date = scheduler._date;
		var original_mode = scheduler._mode;

		xml = xml_top("pages", mode, header, footer);
		for (var temp_date = new Date(start); +temp_date < +end; temp_date = scheduler.date.add(temp_date, 1, view)) {
			scheduler.setCurrentView(temp_date, view);
			xml += xml_start("page") + xml_body_header().replace("\u2013", "-") + xml_body(colors) + xml_end("page");
		}
		xml += xml_end("pages");

		scheduler.setCurrentView(original_date, original_mode);
	} else {
		xml = xml_top("data", mode, header, footer) + xml_body_header().replace("\u2013", "-") + xml_body(colors) + xml_end("data");
	}


	document.getElementById(uid).firstChild.value = encodeURIComponent(xml);
	document.getElementById(uid).submit();
	d.parentNode.removeChild(d);
	
	console.log(xml);
}[/code]

Thanks for your help and please do contact me if you need any more details :slight_smile:

Can I please get a reply on this issue? I am working on an app for my thesis so it would be of great help if you reply to my query. Thanks in advance

Hello,
sorry for such a long reply!
Please find attached our latest development version of the “dhtmlxscheduler_pdf.js” extension. This fix will be included in our next update.
dhtmlxscheduler_pdf.js_20140508.zip (3.47 KB)

Hi,

Thanks for your answer. I just updated my version to the one you sent me and this is what happened. The two pages were now merged in the same page. Is this supposed to happen?



Thanks for your help and for your awesome library :slight_smile: