scheduler.toPDF of appspot.com yeilds blank page

Dear All,

 We are using scheduler.toPDF('http://dhtmlxscheduler.appspot.com/export/pdf') to print the schedule. The sample code given in the documentation is working. If I integrate with our demo version of our webpage, it is not working. On click of the print icon opens the blank page.

The below is the html file and "scheduler.parse([…], “json”); " is dynamically generated on the page load and added to a function which is called at the appropriate place in the init function.

Pl. help

With regards
GK

My Calendar html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; }
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
	<div class="dhx_cal_navline">
		<div class="dhx_cal_prev_button">&nbsp;</div>
		<div class="dhx_cal_next_button">&nbsp;</div>
		<div class="dhx_cal_today_button"></div>
		<div class="dhx_cal_date"></div>
		<div class="dhx_cal_tab" name="print" style='right:300px; top:0px;'>
		    <a href="" onclick="scheduler.toPDF('http://dhtmlxscheduler.appspot.com/export/pdf');return false;" > Print </a> 
		</div> 			
		<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
		<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
		<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
	</div>
	<div class="dhx_cal_header">
	</div>
	<div class="dhx_cal_data">
	</div>
</div>
<%--</form> 

–%>

function dateFormat(input){ //var correctTime=(input.getHours()< P_StartTime)? P_StartTime+ ':0' : input.getHours()+ ':'+input.getMinutes(); //correctTime=(input.getHours()> P_EndTime)? P_StartTime+ ':0' : input.getHours()+ ':'+input.getMinutes(); return input.getFullYear() +'-'+ (input.getMonth()+1)+'-'+input.getDate() + ' '+ input.getHours()+ ':'+input.getMinutes(); } function AddShareEvent(SDate,EDate,EName,eventID){ PageMethods.CreateCalendarShareEvent(customer,cid,dateFormat(SDate),dateFormat(EDate),EName,1,0,P_Slot,OnAddShareSuccess,OnAddShareError); }
function OnAddShareSuccess(result,methodName){ 
isAddEvent=true;
if (result=="0") 
   onAddShareEventFailed();
else
   window.location.href=location.href;
isAddEvent=false;
}
function OnAddShareError(error,userContext,methodName){
alert(error);
if(error!=null) {
    onAddShareEventFailed();
}
}    
function AddUserEvent(SDate,EDate,EName,eventID){  
PageMethods.CreateCalendarEvent(customer,cid,dateFormat(SDate),dateFormat(EDate),EName,1,0,OnAddSuccess,OnAddError);
}
function ModifyShareEvent(SDate,EDate,EName,eventID){
  PageMethods.CreateCalendarShareEvent(customer,cid,dateFormat(SDate),dateFormat(EDate),EName,2,eventID,P_Slot,OnModifySuccess,OnModifyError);
}    
function ModifyUserEvent(SDate,EDate,EName,eventID){
PageMethods.CreateCalendarEvent(customer,cid,dateFormat(SDate),dateFormat(EDate),EName,2,eventID,OnModifySuccess,OnModifyError); 
}
function  DeleteUserEvent(eventID){
//alert(eventID);
PageMethods.DeleteCalendarEvent(customer,cid,eventID,OnDeleteSuccess,OnDeleteError);
}
function  DeleteShareEvent(eventID){
//alert(eventID);
PageMethods.DeleteSharedCalendarEvent(customer,cid,eventID,OnDeleteShareSuccess,OnDeleteShareError);
}  
function OnDeleteShareSuccess(result,methodName){ 

//alert('delete failed ’ + lastEvent.id);
if (result==“0”)
onDeleteEventFailed();
}
function OnDeleteShareError(error,userContext,methodName){
if(error!=null)
onDeleteEventFailed();
}

function OnDeleteSuccess(result,methodName){ 

//alert('delete failed ’ + lastEvent.id);
if (result==“0”)
onDeleteEventFailed();
}
function OnDeleteError(error,userContext,methodName){
if(error!=null)
onDeleteEventFailed();
}

function OnModifySuccess(result,methodName){ 
if (result=="0") 
   onModifyEventFailed();     
}

function OnModifyError(error,userContext,methodName){
if(error!=null) 
    onModifyEventFailed();    
}
    
function OnAddSuccess(result,methodName){ 
isAddEvent=true;
if (result=="0") 
   onAddEventFailed();
else
   onAddEventSucceed(result);
isAddEvent=false;
}
function OnAddError(error,userContext,methodName){
alert(error);
if(error!=null) {
    onAddEventFailed();
}
}
var customer= '1234';
var cid= '12';
var lastEvent;
var isAddEvent,isLightBoxShown;

var P_StartDate=new Date(2011,8,7);
var P_EndDate=new Date(2011,8,13);
var P_StartTime=“9”;
var P_EndTime=“19”;
var P_Slot=“30”
var P_Event=“PPS Week 2011”;

</script>

Problem occurs when you are exporting data from the “week” view, or you are using some custom one?

Are you using latest Scheduler 3.0 ?

Problem occurs both on “Day” and “Week” view. The below is the request sent to the server and there is no response.

POST /export/pdf HTTP/1.1
Accept: /
Referer: “XXXXXXXXXXXXXXX”
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Connection: Keep-Alive
Content-Length: 1905
Host: dhtmlxscheduler.appspot.com
Pragma: no-cache

mycoolxmlbody=%3Cdata+profile%3D%27color%27%3E%3Cscale+mode%3D%27day%27+today%3D%278+Sep+2011%27%3E%3Cx%3E%0D%0A%3Ccolumn%3E%3C%21%5BCDATA%5B8+Sep+2011%5D%5D%3E%3C%2Fcolumn%3E%3C%2Fx%3E%3Cy%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B09%3A00%0D%0A09%3A15%0D%0A09%3A30%0D%0A09%3A45%5D%5D%3E%3C%2Frow%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B10%3A00%0D%0A10%3A15%0D%0A10%3A30%0D%0A10%3A45%5D%5D%3E%3C%2Frow%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B11%3A00%0D%0A11%3A15%0D%0A11%3A30%0D%0A11%3A45%5D%5D%3E%3C%2Frow%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B12%3A00%0D%0A12%3A15%0D%0A12%3A30%0D%0A12%3A45%5D%5D%3E%3C%2Frow%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B13%3A00%0D%0A13%3A15%0D%0A13%3A30%0D%0A13%3A45%5D%5D%3E%3C%2Frow%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B14%3A00%0D%0A14%3A15%0D%0A14%3A30%0D%0A14%3A45%5D%5D%3E%3C%2Frow%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B15%3A00%0D%0A15%3A15%0D%0A15%3A30%0D%0A15%3A45%5D%5D%3E%3C%2Frow%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B16%3A00%0D%0A16%3A15%0D%0A16%3A30%0D%0A16%3A45%5D%5D%3E%3C%2Frow%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B17%3A00%0D%0A17%3A15%0D%0A17%3A30%0D%0A17%3A45%5D%5D%3E%3C%2Frow%3E%0D%0A%3Crow%3E%3C%21%5BCDATA%5B18%3A00%0D%0A18%3A15%0D%0A18%3A30%0D%0A18%3A45%5D%5D%3E%3C%2Frow%3E%3C%2Fy%3E%3C%2Fscale%3E%0D%0A%3Cevent+week%3D%270%27+day%3D%270%27+type%3D%27event_line%27+x%3D%27-1.6657160225733207%27+y%3D%271.2195121951219512%27+width%3D%27100.4361026490998%27+height%3D%27auto%27%3E%3Cbody+backgroundColor%3D%27%27+color%3D%27%27%3E%3C%21%5BCDATA%5BPBY+Week+2011%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%0D%0A%3Cevent+week%3D%27undefined%27+day%3D%270%27+type%3D%27event%27+x%3D%27-1.7526807737134544%27+y%3D%2750.609756097560975%27+width%3D%27101.37651559525241%27+height%3D%2750.609756097560975%27%3E%3Cheader%3E%3C%21%5BCDATA%5B09%3A30±+10%3A00%5D%5D%3E%3C%2Fheader%3E%3Cbody+backgroundColor%3D%27%27+color%3D%27%27%3E%3C%21%5BCDATA%5BMVS+HR+Interview+%5D%5D%3E%3C%2Fbody%3E%3C%2Fevent%3E%3C%2Fdata%3E

We have fixed most critical part of issue ( hosted version will not crash now ), but still there are some problems with muli-day events export.
We will investigate and fix it in the nearest time.

Hi,

Thank you very much for letting us know the issue. We had come up with the work around now.

 On the PDF, all the events are tilted towards left as shown on the image.(The events are not fit in the box) It is the same source code I have included on my first message.  Pl. help

With regards
GK


Dear All

Is there any update on my last message on shifting on event to the left when printing? I have enclosed screen shot in the above thread

With regards
GK

We can reconstruct the issue.
Problem is in dhtmlxscheduler_pdf.js, and fixed file will be provided in few days.

Any updates on this blank page issue?

Fixed js file is attached.
dhtmlxscheduler_pdf.zip (2.67 KB)