When i am converting images(jpg) to swf the resulting image get rotated by 90 degree. Using the excel document, some of the columns are coming down the page. my php code is given below. The commented lines are my effort to make it work. Please help me.
`<?php
$upload_dir = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/';
$upload_url = "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']) . '/';
$temp_name = $_FILES['Filedata']['tmp_name'];
$file_name = $_FILES['Filedata']['name'];
$file_name = str_replace("\\","",$file_name);
$file_name = str_replace("'","",$file_name);
$file_path = $upload_dir.$file_name;
$result = move_uploaded_file($temp_name, $file_path);
if ($result)
{
$message = "<result><status>OK</status><message>$file_name uploaded successfully.</message></result>";
}
else
{
$message = "<result><status>Error</status><message>Somthing is wrong with uploading a file.</message></result>";
}
$p2f = new COM("P2F.Server2");
if ($p2f)
{
//$mypref=new COM("P2F.PrintingPreferences");
//$mypref->Resolution=100;
//$mypref->SetFormName("Letter")
//$mypref->Orientation=1;
//$mypref->SetCustomPaperSize(1500,2000);
$swffile_fs = realpath('convertedfiles/').'\\'.basename($file_path).'.swf';
//$p2f->ConvertFile($file_path,$swffile_fs,$p2f->DefaultProfile,$p2f->DefaultBatchProcessingOptions,$mypref);
$p2f->ConvertFile($file_path,$swffile_fs,,,$mypref);
//$p2f->ConvertFile($file_path,$swffile_fs);
$message = "<result><status>OK</status><message>$swffile_fs</message></result>";
}
echo $message;
exec("copy convertedfiles\\*.swf convertedfiles\\".$_GET['folderName']."\\*.swf");
exec("del convertedfiles\\*.swf");
//exec("del ".$file_name);
?>
Problem with converting images and excel documents.
Re: Problem with converting images and excel documents.
I have the same problem.