Open rajaafrajanjua opened 1 week ago
I want to convert docx file to pdf in laravel i got error "DOMDocument::loadXML(): Namespace prefix m on oMath is not defined in Entity, line: 1" my code is
I just want want to convert the docx file to pdf.
private function convertToPDF($file){ $pdfPath = tempnam(sys_get_temp_dir(), 'phpword_') . '.pdf'; Settings::setPdfRendererName(Settings::PDF_RENDERER_DOMPDF); Settings::setPdfRendererPath(base_path('vendor/dompdf/dompdf')); $phpWord = IOFactory::load($file); $phpWordString = print_r($phpWord, true); Log::error("phpWord: {$phpWordString}"); $xmlWriter = IOFactory::createWriter($phpWord, 'PDF'); Log::error("xmlWriter: " . $xmlWriter); $xmlWriter->save($pdfPath); return $pdfPath; }
1.2
8.2
@tayyabjanjua Hi, Could you send the file for reproducing the issue ?
You Can crowdfund by following this link : https://docs.algora.io/bounties/workflow
Describe the bug and add attachments
I want to convert docx file to pdf in laravel i got error "DOMDocument::loadXML(): Namespace prefix m on oMath is not defined in Entity, line: 1" my code is
Expected behavior
I just want want to convert the docx file to pdf.
Steps to reproduce
PHPWord version(s) where the bug happened
1.2
PHP version(s) where the bug happened
8.2
Priority