mikehaertl / phpwkhtmltopdf

A slim PHP wrapper around wkhtmltopdf with an easy to use and clean OOP interface
MIT License
1.6k stars 238 forks source link

Font Issue - char "O" been rendering malformed #383

Closed Ricardo-gprado closed 2 years ago

Ricardo-gprado commented 2 years ago

After converting an image with font GT-America-standart-regular, the char O is rendering malformed, any idea what could be doing this ?

`
if (!file_exists($path)) {
    $uri = 'private://node_' . $nid . '.html';
    $pdf_exec = 'wkhtmltopdf --encoding utf-8 -B 0px -L 0px -R 0px -T 0px -d 300 --image-dpi 300 --page-width ' . ($args['width']*2+1) . 'px --page-height ' . ($args['height']*2+5) . 'px';
    $img_exec = 'wkhtmltoimage --encoding utf-8 --disable-smart-width --width ' . $args['width'] . ' --height ' . $args['height'];
    $executable = ($format == 'pdf') ? $pdf_exec : $img_exec;
    $path= drupal_realpath($uri);
    $htmlfilename = $path;
    $rendered_view = theme('asset', $args);
    file_put_contents($htmlfilename, $rendered_view);
    $exec_cmd = DRUPAL_ROOT . '/'. $executable;
    $exec_cmd .= " $htmlfilename $imgfilename";
    `$exec_cmd`;
  }
mikehaertl commented 2 years ago

You seem to report to the wrong repository. Your code is not related to our library at all.