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.
New user. I'm creating Word docx files from simple HTML -- with a bullet list, a table, and a number list -- just fine.
However, when I try to generate a PDF from the same HTML, the bullet list shows up with no bullets, the table doesn't look like a table, and the number list isn't numbered. I must be missing a step?
I'm using this PHP code ($htmlDoc is the source HTML):
$tmpFileName = 'gtemp1';
$docx = new CreateDocx();
$docx->embedHTML($htmlDoc);
$docx->createDocx($tmpFileName); // Automatically appends .docx to the file name
$document = new TransformDoc();
$document->setStrFile($tmpFileName . '.docx');
$document->setStrOutputFile($fileName . '.pdf');
$document->generatePDF();
And the PDF has paragraph breaks, but no list/table formatting
Any suggestions appreciated
gary
Hello,
We recommend you to use PRO v2.5 + conversion plugin, that has several improvements.
Regards.
I am using the latest Pro+Converter. Just bought and installed it last week.
Unfortunately, the plugin is not generating any output.
I changed the code to:
$docx = new CreateDocx();
$docx->enableCompatibilityMode();
$text = "Here's some text to put into the file";
$paramsText = array( 'b' => 'single', 'font' => 'Arial' );
$docx->addText($text, $paramsText);
$docx->createDocx('gTemp1');
$docx->transformDocx('gTemp1.docx', 'gTemp1.pdf');
echo("JUST GENERATED PDF FILE gTemp1.pdf");
The file gtemp1.docx gets created, but no .pdf document is created anywhere on my server.
SAME THING happens when i run the phpdocx/examples/advanced/Transform.php example program. It generates the docx file, but no pdf file is generated anywhere.
Please help.
Hello,
First you must start OpenOffice using this command:
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
and then you can transform documents using TransformDocAdv.
Regards.