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

How to set command options to check what is not running #349

Closed Neobugu closed 4 years ago

Neobugu commented 4 years ago

Hello, since I didnt wrote any manual since last issues (MB) for personal code I would like to ask an assitance to see debug code if anything under my code is left of loading (I remember a debug mode that throws the name of file is missing to load), this is my code:

$opciones = array(
         'binary' => $_SERVER['DOCUMENT_ROOT'] . '/../private_html/fglobales/wkhtmltox/bin/wkhtmltopdf', // LINUX
        'commandOptions' => array(
          'useExec' => true,
        ),
        'header-html' => $headerHtml,
        'footer-font-size' => 7,
        'footer-left' => utf8_decode( 'Este documento es una representacion de un CFDI version 3.3' ),
        'footer-right' => utf8_decode('[page]'),
        'margin-top' => "33mm",
        'page-size' => "Letter",
        'header-spacing' => 3,
        'user-style-sheet' => "Body.css",
        'debug-javascript','enable-javascript','javascript-delay'=>1000,'no-stop-slow-scripts'
      );      

      $pdf = new Pdf( $opciones );
      $pdf->addPage( $bodyHtml );
      if ( !$pdf->saveAs( $rutaSalida ) ) {
        throw new Exception( $pdf->getError() );
      }

I receive command failed

mikehaertl commented 4 years ago

There is no debug option in this library. Not sure if this answers your question.