Das in der docx-Datei angezeigte Bild ist im PDF nicht sichtbar, wenn es mit unoconv konvertiert wirdPhp

PHP-Programmierer chatten hier
Guest
 Das in der docx-Datei angezeigte Bild ist im PDF nicht sichtbar, wenn es mit unoconv konvertiert wird

Post by Guest »

Das in der docx-Datei angezeigte Bild ist im PDF nicht sichtbar, wenn es mit unoconv konvertiert wird, wo das Bild mit
angezeigt wird

Code: Select all

$document = new \PhpOffice\PhpWord1\TemplateProcessor($docx_temp_file_path);
$imagePath = '/abc.png';
if (file_exists($imagePath)) {
$document->setImageValue($key, $imagePath);
}
Hier ist der unoconv-Code

Code: Select all

public function docxToPdf( $docx_file_path, $pdf_file_path )
{
$pythonPath = '/usr/bin/python';
$unoconvPath = '/usr/bin/unoconv';
$command = sprintf(
'"%s" "%s" -f pdf "%s" 2>&1',
$pythonPath,
$unoconvPath,
$docx_file_path
);

exec($command, $output, $return);
//
if (is_array($output) && !empty($output[0])) {
throw new Exception(json_encode(implode('; ', $output), true));
}
return true;
}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post