Output(dirname(__FILE__).'/pdf/'.(int) $id_order.'.pdf', 'F'); // } else { // echo $id_order."\n"; // } // } // foreach( array('8R27056095774' '7R00015822420' '7R00015822253' '6A10909980655' '6A09248520172') as $id_order) { $pdf = new PDF('P', 'mm', 'A4'); $order = new Order((int) $id_order); if(Validate::isLoadedObject($order)) { PDF::invoice($order, 'F', TRUE, $pdf); $pdf->Output(dirname(__FILE__).'/pdf/'.(int) $id_order.'.pdf', 'F'); } else { echo $id_order."\n"; } }