waqas
waqas

Reputation: 181

High Charts export image on the server

I am exporting image on the server using High chart.Using the below code

exporting: { url:'example.com/highcharts/exporting-server/php/php-batik/' }

I have download batik-rasterizer-1.6.jar and extract the zip file and rename the folder to batik- rasterizer.jar and put the folder in the following route.

example.com/highcharts/exporting-server/php/php-batik/batik-rasterizer.jar

and index.php file i used below code

define ('BATIK_PATH', 'batik-rasterizer.jar');

When I converting, I got the following error:

Error while converting SVG. 

Upvotes: 1

Views: 2776

Answers (1)

gert vaartjes
gert vaartjes

Reputation: 988

If for any reason the export-server fails to export images, then consider pasting this code snippet to output error messages. Paste this before Line 78, beginning with the commenting text:

Paste before

// Do the conversion.

This snippet

// Troubleshoot snippet
$command = "java -jar ". BATIK_PATH ." $typeString -d $outfile $width temp/$tempName.svg 2>&1"; 
$output = shell_exec($command);
echo "Command: $command <br>";
echo "Output: $output";
die;

This will hopefully reveal the underlying problem.

Upvotes: 4

Related Questions