phpLiveDocx on "Zend Core for i5"
Posted: Tue Apr 21, 2009 2:11 am
Hi,
I want to use phpLiveDocx http://www.phplivedocx.org/ to convert an RTF file to pdf.
After installing the system I tried to modify the includes converter sample to run as a webside:
When I "start" the skript it runs some seconds and the the browser wants me to Save the convert-document2.php Skript instead of displaying it. Other PHP-Skripts run without problems. If I remove the line with the skript runs normal (with output in the browser window), but (as expected) don't convert anything.
Does anybody has an idea what the problem could be here?
The PHP-errorlog doesn't show anything.
I also tried the telephone bill sample in the same way, but it doesn't do anything.....
Thanks for any ideas....
Greetings
Thorsten
I want to use phpLiveDocx http://www.phplivedocx.org/ to convert an RTF file to pdf.
After installing the system I tried to modify the includes converter sample to run as a webside:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="content-language" content="de">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<HTML>
<head>
<title>PDF Dokument erzeugen</title>
</head>
<body>
<?php
require_once dirname(__FILE__) . '/../../common.php';
require_once 'Converter.php';
// -----------------------------------------------------------------------------
$filename = 'document.doc'; // file to convert
$format = 'pdf'; // format to which to convert
// -----------------------------------------------------------------------------
$targetFilename = Converter::getFilename($filename, $format);
echo 'Converting %s to %s... ', $filename, $targetFilename;
$targetDocument = Converter::convert($filename, $format);
if (false !== $targetDocument) {
file_put_contents($targetFilename, $targetDocument);
print("DONE.\n");
} else {
print("ERROR.\n");
}
?>
</body>
</html>Code: Select all
$targetDocument = Converter::convert($filename, $format);Does anybody has an idea what the problem could be here?
The PHP-errorlog doesn't show anything.
I also tried the telephone bill sample in the same way, but it doesn't do anything.....
Thanks for any ideas....
Greetings
Thorsten