skip to Main Content

How to take into account the color of the graphics of Docx files when converting them to PDF using phpword?

Here is the code I used to convert my docx files to PDF: <?php require_once 'vendor/autoload.php'; use PhpOfficePhpWordIOFactory as WordIOFactory; use PhpOfficePhpWordSettings; // Set PDF renderer. // Make sure you have `tecnickcom/tcpdf` in your composer dependencies. Settings::setPdfRendererName(Settings::PDF_RENDERER_TCPDF); // Path to…

VIEW QUESTION

How to change the title of a Word file using PHPWord TemplateProcessor

I am trying to create one .docx file from a template using the below code. $phpWord = new PhpOfficePhpWordTemplateProcessor(storage_path().'apppublicsamplesample.docx'); $phpWord->setValue('days', '365'); $phpWord->setValue('what', 'Benchmark'); $phpWord->setValue('test', 'KKKK'); $phpWord->setValue('best', 'MMMM'); $phpWord->saveAs(storage_path().'apppublicsamplefinal.docx'); the sample.docs file is like. but when I run the above code…

VIEW QUESTION
Back To Top
Search