Forum


Replies: 3   Views: 2921
Pdf transformation not working
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by skilltran  · 21-06-2018 - 18:57

Even with a simple example, the PDF file doesn't get created.  From a web request, there are no errors.

We're using a CentOS 6 operating system.

Here's the PHP code we're using:

<?php

include '../rpcl/phpdocx/classes/CreateDocx.php';

$docx = new CreateDocx();

$docx->enableCompatibilityMode();
$text = 'This is a test';
$paramsText = array( 'b' => 'single', 'font' => 'Arial' );
$docx->addText($text, $paramsText);

$docx->createDocx('../reportcache/example_text');

$transform = new TransformDocAdvOpenOffice();
$path = realpath('../reportcache/example_text.docx');
$transform->transformDocument($path, str_replace('.docx', '.pdf', $path), realpath('../reportcache/'), array('debug' => true, 'method' => 'script'));

?>

Running from the command line, we get this:

ERROR: connection failed.  Please make sure OpenOffice.org is running and listening on port 8100.

Using "ps -ef" we can confirm that open office is running.  This is the command we used to start it:

# /opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp" -nofirststartwizard &
 

Any help would be greatly appreciated.

Thanks,
Jeff Truthan