Some progress, but I am getting:
PHP Fatal error: Call to a member function get_pdf() on a non-object
I have included wp-load.php at the beginning of the script. Is there something I am missing? here is what I am working with:
<?php
define('WP_USE_THEMES', false);
require_once( "/path_to/wp-load.php" );
global $wpo_wcpdf;
$order_id = 1234; // define your order_id or get it from an existing $order object.
$pdf = $wpo_wcpdf->export->get_pdf( 'packing-slip', (array) $order_id ); // replace 'packing-slip' by 'invoice' to get the invoice
$pdf_path = 'path/for/pdf/storage/';
$pdf_filename = 'packing-slip.pdf';
?>