1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Stub PDF generator

This commit is contained in:
David Bomba 2023-02-21 20:41:23 +11:00
parent c3674a8f4f
commit 58317f24e8
2 changed files with 5 additions and 5 deletions

View File

@ -182,14 +182,14 @@ class PreviewController extends BaseController
return response()->json(['message' => 'This server cannot handle this request.'], 400);
}
$stub = new StubBuilder(auth()->user()->company(), auth()->user());
$stub->setEntityType($request->entity_type)
->setSettings($request->settings)
->setSettingsType($request->settings_type);
->setSettingsType($request->settings_type)
->build();
$pdf = $stub->build()->getPdf();
$pdf = $stub->getPdf();
$response = Response::make($pdf, 200);
$response->header('Content-Type', 'application/pdf');

View File

@ -195,7 +195,7 @@ class StubBuilder
$maker = new PdfMaker($state);
$this->html = $maker->design($design)
$this->html = $maker->design($template)
->build()
->getCompiledHTML();