• Hi there,

    Awesome plugin! I am trying to send all customers a PDF in the evening on the day of delivery.

    The problem is that when I create a PDF it is blank. The PDF file has a size 107 KB but is completely blank when opened.

    My code:

    $pdfinvoice = new WooCommerce_PDF_Invoices_Export;
     $template_type= 'invoice';
    $order_ids = array(140);
     $filename = 'theinvoice.pdf';
    
    $dompdf =  $pdfinvoice->generate_pdf( $template_type, $order_ids );
    $output = $dompdf->output();
    file_put_contents($filename, $output);

    WP_Debug shows no errors 🙁

    https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Blank PDF when created programmatically’ is closed to new replies.