Problem with converting images and excel documents.

Questions related to converting various types of documents
Post Reply
Anu6705
Posts:2
Joined:Tue Jul 28, 2009 5:05 am
Problem with converting images and excel documents.

Post by Anu6705 » Wed Jul 29, 2009 2:20 am

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);
?>

shystars
Posts:1
Joined:Thu Nov 19, 2009 1:44 am

Re: Problem with converting images and excel documents.

Post by shystars » Fri Nov 20, 2009 1:36 am

I have the same problem. :(

Post Reply