This usually works for me:
$request = $this->getRequest();
$invoice_number = $request->getParam('invoicenr');
try {
header('Content-type: application/pdf');
header('Accept-Language: en-US');
header('Content-Disposition: attachment; filename="downloaded.pdf"');
$pdf = Recurly_Invoice::getInvoicePdf($invoice_number, 'en-US');
print($pdf);
} catch (Recurly_NotFoundError $e) {
print "Invoice not found.\n";
}
You can always submit a support ticket to support@recurly.com as they provide support for all their client libraries.