Sign in to follow this  
saurabh

Problem while saving as pdf/image

Recommended Posts

Hi Guys,

 

 

 

I am able to download the chart as image/Pdf successfully. Below is my code:

 

 

 

$strXML = "";

 

 

 

foreach ($totalRecords as $key => $value) :

 

$strXML .= "";

 

endforeach;

 

$strXML .= "";

 

 

 

echo renderChart("/FusionCharts/Bar2D.swf", "", $strXML, "productSales", 600, 300, "1", "0");

 

 

 

 

 

When I want to save the chart on server, I change the code as below:

 

 

 

$strXML = "";

 

 

 

foreach ($totalRecords as $key => $value) :

 

$strXML .= "";

 

endforeach;

 

$strXML .= "";

 

 

 

echo renderChart("/FusionCharts/Bar2D.swf", "", $strXML, "productSales", 600, 300, "1", "1");

 

 

 

 

 

But the funny thing is that the control doesn't go inside FCExpoerter.php in this case. I have also set the path inside FCExpoerter.php but i guess thats irrelevant until the control goes inside. The download still works well if i switch from 'save' to 'download'.

 

 

 

Is there anything else that I am missing. Has anyone faced this kind of situation?

 

 

 

Any help would be appreciated.

 

 

 

Thanks in Advance

 

Saurabh Mahajan

Edited by Guest

Share this post


Link to post
Share on other sites

Hi Saurabh,

 

 

 

Apologies for the delay in the reply.

 

 

 

Could you please make sure whether you have the proper permission(s) to save the image file at server's folder?

Share this post


Link to post
Share on other sites

Hi Ayan,

 

 

 

Thanks for your reply.

 

 

 

I do have the permission to save the file on the said directory.

 

 

 

But as I wrote in my previous posts, these things come into play only when my flow goes into the file FCExpoerter.php, which is not happening currently

 

Since the flow goes into the FCExporter.php while I am downloading, so I suppose path to FCExporter.php is not an issue.

 

 

 

By the way capturing process happens correctly. and after that it just stops. I guess there is some other problem. Don't know what :)

 

 

 

Thanks,

 

Saurabh Mahajan

Share this post


Link to post
Share on other sites
Guest Rajroop

Hi,

 

 

 

Since, 'DOWNLOAD' is working correctly, it seems that the FCExporter.php is being connected. So would while you opt to 'SAVE'.

 

 

 

Hence, we can narrow down the issue to be an issue with FCExporter failing to save to the server whose path might not have been specified properly or the web server user/web application user does not have write permission to write on that folder, or in extreme case is saving to some other folder which you might be overlooking.

 

 

 

May I ask you to evoke the export callback JavaScript function and see what notice it sends.

 

 

 

The export callback passes a JavaScript object to the callback function with properties:

 

 

 

notice, statusMessage, statusCode etc.

 

 

 

Please alert or see what comes to notice property.

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Maybe I was not clear in my previous post.

 

I repeat, the FCExporter.php is NOT getting connected while I am using 'SAVE'. It is getting connected only in case of 'DOWNLOAD'. I have got the callback function included in my js but its useless unless i get connected to FCExporter.php

 

 

 

Is there anything different I need to do to get connected to FCExporter.php in case of 'SAVE'? I have followed the 4 points mentioned in documentation.

 

 

 

Thanks,

 

Saurabh.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this