SimpleXMLElement error - exporting Scheduler to PDF

Hello,

I know this has been discussed before as I have searched the forum. I have made sure that I have all the latest php and js files on the server. However, I am still getting the error:
SimpleXMLElement::__construct() [simplexmlelement.–construct]: Entity: line 1: parser error : Start tag expected, ‘<’ not found

I have echo-ed the strHTML (pasted below) as our site is on a hosted web server and I do not have permission to save the error_log on the site…I can upload via ftp however, I was unable to get this working. Perhaps looking at the output below will be enough to point me in the right direction?

I am going crazy trying to figure out what I could be doing wrong!!

Thanks in advance.

Cheers,

%3Cdata%20profile%3D’color’%3E%3Cscale%20mode%3D’timeline’%20today%3D’4%20Jun%202012’%3E%3Cx%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B08%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B08%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B09%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B09%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B10%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B10%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B11%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B11%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B12%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B12%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B13%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B13%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B14%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B14%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B15%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B15%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B16%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B16%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B17%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B17%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B18%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B18%3A30%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B19%3A00%5D%5D%3E%3C%2Fcolumn%3E%0A%3Ccolumn%3E%3C!%5BCDATA%5B19%3A30%5D%5D%3E%3C%2Fcolumn%3E%3C%2Fx%3E%3Cy%3E%3Crow%3E%3C!%5BCDATA%5B-MON%2C%2004%2F06%2F2012%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAlan%20Boswell%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAmanda%20Jones%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BBarbara%20Erickson%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BDavid%20Reckford%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BPhilip%20Herridge%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BTom%20Lowry%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5B-TUES%2C%2005%2F06%2F2012%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAlan%20Boswell%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAmanda%20Jones%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BBarbara%20Erickson%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BDavid%20Reckford%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BPhilip%20Herridge%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BTom%20Lowry%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5B-WED%2C%2006%2F06%2F2012%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAlan%20Boswell%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAmanda%20Jones%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BBarbara%20Erickson%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BDavid%20Reckford%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BPhilip%20Herridge%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BTom%20Lowry%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5B-THURS%2C%2007%2F06%2F2012%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAlan%20Boswell%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAmanda%20Jones%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BBarbara%20Erickson%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BDavid%20Reckford%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BPhilip%20Herridge%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BTom%20Lowry%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5B-FRI%2C%2008%2F06%2F2012%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAlan%20Boswell%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BAmanda%20Jones%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BBarbara%20Erickson%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BDavid%20Reckford%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BPhilip%20Herridge%5D%5D%3E%3C%2Frow%3E%3Crow%3E%3C!%5BCDATA%5BTom%20Lowry%5D%5D%3E%3C%2Frow%3E%3C%2Fy%3E%3C%2Fscale%3E%0A%3Cevent%20week%3D’16’%20day%3D’0’%20type%3D’event_line’%20x%3D’681.8181818181819’%20y%3D’6.4’%20width%3D’275.75757575757575’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(0%2C%20102%2C%200)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BHaicheur%20-%20%231548%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’17’%20day%3D’0’%20type%3D’event_line’%20x%3D’681.8181818181819’%20y%3D’6.4’%20width%3D’275.75757575757575’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(255%2C%20102%2C%2051)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BMah%C3%A9rault-Mougin%20-%20%231550%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’18’%20day%3D’0’%20type%3D’event_line’%20x%3D’1172.7272727272727’%20y%3D’6.4’%20width%3D’284.8484848484848’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(204%2C%200%2C%2051)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BVie%20-%20%231539%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’22’%20day%3D’0’%20type%3D’event_line’%20x%3D’293.93939393939394’%20y%3D’6.4’%20width%3D’275.75757575757575’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(0%2C%2051%2C%20102)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BEnglish%20Club%201%20-%20%231590%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’22’%20day%3D’0’%20type%3D’event_line’%20x%3D’584.8484848484849’%20y%3D’6.4’%20width%3D’275.75757575757575’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(0%2C%2051%2C%20102)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BEnglish%20Club%202%20-%20%231593%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’24’%20day%3D’0’%20type%3D’event_line’%20x%3D’293.93939393939394’%20y%3D’6.4’%20width%3D’275.75757575757575’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(255%2C%20102%2C%2051)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BAupy%20%2F*%20English%20Club%201%20%2F%20Lecoq%20%2F%20Montero-Vargas%20%2F%20Peyre%20-%20%231571%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’24’%20day%3D’0’%20type%3D’event_line’%20x%3D’584.8484848484849’%20y%3D’6.4’%20width%3D’275.75757575757575’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(255%2C%20102%2C%2051)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BBigot%20%2F*%20English%20Club%202%20%2F%20Lannier%20%2F%20Zaegel%20-%20%231572%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’26’%20day%3D’0’%20type%3D’event_line’%20x%3D’972.7272727272727’%20y%3D’6.4’%20width%3D’184.84848484848484’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(255%2C%2051%2C%20153)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BPustowka%20-%20%231596%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’26’%20day%3D’0’%20type%3D’event_line’%20x%3D’1172.7272727272727’%20y%3D’6.4’%20width%3D’184.84848484848484’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(255%2C%2051%2C%20153)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BJamin%20-%20%231549%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’26’%20day%3D’0’%20type%3D’event_line’%20x%3D’1372.7272727272727’%20y%3D’6.4’%20width%3D’184.84848484848484’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(255%2C%2051%2C%20153)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BMoutier%20%2F%20Petiot%20-%20%231536%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’26’%20day%3D’0’%20type%3D’event_line’%20x%3D’1672.7272727272727’%20y%3D’6.4’%20width%3D’184.84848484848484’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(255%2C%2051%2C%20153)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BNabbi%20-%20%231544%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0A%3Cevent%20week%3D’27’%20day%3D’0’%20type%3D’event_line’%20x%3D’196.96969696969697’%20y%3D’6.4’%20width%3D’178.7878787878788’%20height%3D’52’%20len%3D’0’%3E%3Cbody%20backgroundColor%3D’rgb(102%2C%2051%2C%20153)’%20color%3D’rgb(255%2C%20255%2C%20255)’%3E%3C!%5BCDATA%5BVaille%20-%20%231529%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%3C%2Fdata%3E

Hi,
please, open generate.php file and modify it like here:

$xml = urldecode($xml);
$xml = new SimpleXMLElement($xmlString, LIBXML_NOCDATA);

Hi and thank you very much for your quick response…I did what you said and I get this error:

Undefined variable: xml

??

Thanks again and cheers,

I changed the code a bit and this works:

$xml = urldecode($xmlString);
$xml = new SimpleXMLElement($xml, LIBXML_NOCDATA);

One thing–the events do not line up exactly with the times–they seem a bit off. Can this be fixed? Also, any way to color in the divider row (The one with a date, not a name-I use the tree layout) to separate each one? Attached is the screen shot.

Cheers,


Hello again,

This is the actual timeline view, so you can see that the events are not quite lined up in the pdf.

Also, you can see the row with the date is colored in and separates it from the next day’s schedule. I would like to have this row shaded in pdf as well. Is it possible?

Thanks again,


Hello again,

Does anyone have any idea why the pdf is not rendered exactly as the timeline view causing the events to not line up. It seems the columns for the time are wider and the font also seems different. Is there a way to fix this???

Many thanks again!

Cheers,

Hi,
please, try to update scheduler-pdf-php from attachment.
Could you provide complete demo if still doesn’t work?
scheduler-pdf-php-positions.zip (629 KB)

Hi,

I have done as you suggested but have the same result – the events are not lined up correctly as all of the events start on the hour or 1/2 hour.

What do you need to see in order to perhaps solve this?

Thanks,


It seems like the font is bigger (and a different font) in the pdf and there is more padding in the columns than in the Timeline view which seems to be perhaps affecting how the events line up…

??

Please, try to update dhtmlxscheduler_pdf.js from attachment too.
The problem is that event position are calculated incorrect, it’s independed of column width.
dhtmlxscheduler_pdf.zip (3.04 KB)

Hello,

Thanks again. I have installed it and still have the same results. Screen shot attached…

I really like your products so am hoping we can figure this out…surely someone else has had this issue as I am just trying to export a pretty simple timeline view (??)

Cheers,


Hello again,

Any idea on what I can do to get the events to line up correctly???

Thanks again and cheers,

Hello again,

Perhaps you could point me to areas in your code where I could play around with the parameters that you think might be affecting the layout of the timeline view events in the PDF…??

Cheers,

Hi, sorry for the delay in answerring.
Could you provide complete demo with a problem so that I could repeat the problem at the local machine?

Hi,

Can I send you the link in a private message?

Thanks,

yes, it will be ok.

Hi,
issue is fixed. Please, update dhtmlxscheduler_pdf.js from attachment one more time.
dhtmlxscheduler_pdf.zip (2.71 KB)

I have installed as you said, but I still have the same results…??

You have my link so you can also see…

??

Thanks again for all of your effort!

Cheers,

Hi,
please, make sure that you’ve updated dhtmlxscheduler_pdf.js. Your sample uses old version of this file for now.

Hi,

I have just deleted and uploaded your file again and I still have the same layout…are you sure the zip file you attached had the new file?

Thanks a lot,