Forum


Replies: 1   Views: 1335
Docx with comments and tranformdocument or transformdocadvpdf or transformdocadvdompdf
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 Bardehle  · 02-04-2021 - 07:57

Hello,

I'm usind PHPDOCX 10 Premium and would like to transform an existing docx with comments to PDF.
I tried TranformDocument, TransformDocAdvPDF and TransformDocAdvDOMPDF but in all cases I only have "[COMMENT x]" (x = number 1,....) "links" in the generated PDF. These "[COMMENT x]" links are blue and underlined but do not have any action. 

My code:

$outfile = 'test.pdf';
$infile = 'test.docx';

require_once 'CreateDocx.php';
require_once 'dompdf/autoload.inc.php';
$dompdf = new Dompdf\Dompdf();

$transform = new TransformDocAdvDOMPDF($infile);
$transform->setDOMPDF($dompdf);
$transform->transform($outfile);

 

or

$outfile = 'test.pdf';
$infile = 'test.docx';

require_once 'CreateDocx.php';
$docx = new \CreateDocx();

$docx->transformDocument($infile, $outfile, 'native', array('stream' => false));

Am I missing anything?

Thank you

Christian